svn path=/trunk/mcs/; revision=64924
[mono.git] / man / mono.1
index 098b016e70a73d9c2042d84274eefe7a4baf6583..1106ff4044b82e69318d533ab3a52973556928b5 100644 (file)
@@ -249,6 +249,13 @@ compiled.  This is used for testing the code generator performance.
 Displays information about the work done by the runtime during the
 execution of an application. 
 .TP
+.I "--wapi=hps|semdel"
+Perform maintenance of the process shared data.
+.Sp
+semdel will delete the global semaphore.
+.Sp
+hps will list the currently used handles.
+.TP
 .I "-v", "--verbose"
 Increases the verbosity level, each time it is listed, increases the
 verbosity level to include more information (including, for example, 
@@ -277,8 +284,13 @@ is a profiler-specific string of options for the profiler itself.
 .Sp
 The default profiler accepts the following options 'alloc' to profile
 memory consumption by the application; 'time' to profile the time
-spent on each routine and 'stat' to perform sample statistical
-profiling.  If no options are provided the default is 'alloc,time'.
+spent on each routine; 'jit' to collect time spent JIT-compiling methods
+and 'stat' to perform sample statistical profiling.
+If no options are provided the default is 'alloc,time,jit'. 
+.PP
+By default the
+profile data is printed to stdout: to change this, use the 'file=filename'
+option to output the data to filename.
 .Sp
 For example:
 .nf
@@ -292,11 +304,16 @@ and allocation profiling.
 .Sp
 .nf
 
-       mono --profile=default:stat,alloc program.exe
+       mono --profile=default:stat,alloc,file=prof.out program.exe
 
 .fi
 Will do  sample statistical profiling and allocation profiling on
-program.exe.
+program.exe. The profile data is put in prof.out.
+.Sp
+Note that the statistical profiler has a very low overhead and should
+be the preferred profiler to use (for better output use the full path
+to the mono binary when running and make sure you have installed the
+addr2line utility that comes from the binutils package).
 .SH PROFILERS
 There are a number of external profilers that have been developed for
 Mono, we will update this section to contain the profilers.
@@ -410,6 +427,14 @@ Typical output looks like this:
 .PP
 The offsets displayed are IL offsets.
 .SH DEBUGGING
+It is possible to obtain a stack trace of all the active threads in
+Mono by sending the QUIT signal to Mono, you can do this from the
+command line, like this:
+.nf
+       kill -QUIT pid
+.fi
+Where pid is the Process ID of the Mono process you want to examine.
+The process will continue running afterwards.
 .PP
 You can use the MONO_LOG_LEVEL and MONO_LOG_MASK environment variables
 to get verbose debugging output about the execution of your
@@ -462,7 +487,11 @@ to disable the use of a C# customized
 serializer, or an integer that is the minimum number of uses before
 the runtime will produce a custom serializer (0 will produce a
 custom serializer on the first access, 50 will produce a serializer on
-the 50th use).
+the 50th use). Mono will fallback to an interpreted serializer if the
+serializer generation somehow fails. This behavior can be disabled
+by setting the option
+.B `nofallback'
+(for example: MONO_XMLSERIALIZER_THS=0,nofallback).
 .SH ENVIRONMENT VARIABLES
 .TP
 .I "GC_DONT_GC"
@@ -474,11 +503,6 @@ If set, this variable will instruct Mono to ahead-of-time compile new
 assemblies on demand and store the result into a cache in
 ~/.mono/aot-cache. 
 .TP
-.I "MONO_ASPNET_NODELETE"
-If set to any value, temporary source files generated by ASP.NET support
-classes will not be removed. They will be kept in the user's temporary
-directory.
-.TP
 .I "MONO_CFG_DIR"
 If set, this variable overrides the default system configuration directory
 ($PREFIX/etc). It's used to locate machine.config file.
@@ -520,6 +544,13 @@ If set, tells mono NOT to attempt using native asynchronous I/O services. In
 that case, a default select/poll implementation is used. Currently only epoll()
 is supported.
 .TP
+.I "MONO_DISABLE_MANAGED_COLLATION"
+If this environment variable is `yes', the runtime uses unmanaged
+collation (which actually means no culture-sensitive collation). It
+internally disables managed collation functionality invoked via the
+members of System.Globalization.CompareInfo class. Collation is
+enabled by default.
+.TP
 .I "MONO_EGD_SOCKET"
 For platforms that do not otherwise have a way of obtaining random bytes
 this can be set to the name of a file system socket on which an egd or
@@ -537,6 +568,12 @@ and then this list is tried in order with the first successful
 conversion ending the search.  When writing external text (e.g. new
 filenames or arguments to new processes) the first item in this list
 is used, or UTF-8 if the environment variable is not set.
+.IP
+The problem with using MONO_EXTERNAL_ENCODINGS to process your
+files is that it results in a problem: although its possible to get
+the right file name it is not necessarily possible to open the file.
+In general if you have problems with encodings in your filenames you
+should use the "convmv" program.
 .TP
 .I "MONO_GAC_PREFIX"
 Provides a prefix the runtime uses to look for Global Assembly Caches.
@@ -545,20 +582,41 @@ unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
 install. Or to the directory provided in the gacutil /gacdir command. Example:
 .B /home/username/.mono:/usr/local/mono/
 .TP
-.I "MONO_LOG_LEVEL"
-The logging level, possible values are `error', `critical', `warning',
-`message', `info' and `debug'.  See the DEBUGGING section for more
-details.
+.I "MONO_EVENTLOG_TYPE"
+Sets the type of event log provider to use (for System.Diagnostics.EventLog).
+.Sp
+Possible values are:
+.RS
 .TP
-.I "MONO_LOG_MASK"
-Controls the domain of the Mono runtime that logging will apply to. 
-If set, the log mask is changed to the set value. Possible values are
-"asm" (assembly loader), "type", "dll" (native library loader), "gc"
-(garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
-The default value is "all". Changing the mask value allows you to display only 
-messages for a certain component. You can use multiple masks by comma 
-separating them. For example to see config file messages and assembly loader
-messages set you mask to "asm,cfg".
+.I "local[:path]"
+.Sp
+Persists event logs and entries to the local file system.
+.Sp
+The directory in which to persit the event logs, event sources and entries
+can be specified as part of the value.
+.Sp
+If the path is not explicitly set, it defaults to "/var/lib/mono/eventlog"
+on unix and "%APPDATA%\mono\eventlog" on Windows.
+.TP
+.I "win32"
+.Sp
+.B 
+Uses the native win32 API to write events and registers event logs and
+event sources in the registry.   This is only available on Windows. 
+.Sp
+On Unix, the directory permission for individual event log and event source
+directories is set to 777 (with +t bit) allowing everyone to read and write
+event log entries while only allowing entries to be deleted by the user(s)
+that created them.
+.TP
+.I "null"
+.Sp
+Silently discards any events.
+.ne
+.PP
+The default is "null" on Unix (and versions of Windows before NT), and 
+"win32" on Windows NT (and higher).
+.RE
 .TP
 .I "MONO_MANAGED_WATCHER"
 If set to any value, System.IO.FileSystemWatcher will use the default
@@ -567,7 +625,11 @@ Unix systems and native API calls on Windows, falling back to the
 managed implementation on error.
 .TP
 .I "MONO_PATH"
-Provides a search path to the runtime where to look for library files.
+Provides a search path to the runtime where to look for library
+files.   This is a tool convenient for debugging applications, but
+should not be used by deployed applications as it breaks the assembly
+loader in subtle ways. 
+.Sp
 Directories are separated by the platform path separator (colons on unix). Example:
 .B /home/username/lib:/usr/local/mono/lib
 .TP
@@ -598,12 +660,61 @@ If set its the directory where the ".wapi" handle state is stored.
 This is the directory where the Windows I/O Emulation layer stores its
 shared state data (files, events, mutexes, pipes).  By default Mono
 will store the ".wapi" directory in the users's home directory.
+.TP 
+.I "MONO_SHARED_HOSTNAME"
+Uses the string value of this variable as a replacement for the host name when
+creating file names in the ".wapi" directory. This helps if the host name of
+your machine is likely to be changed when a mono application is running or if
+you have a .wapi directory shared among several different computers.
+.Sp
+Mono typically uses the hostname to create the files that are used to
+share state across multiple Mono processes.  This is done to support
+home directories that might be shared over the network.
+.TP
+.I "MONO_STRICT_IO_EMULATION"
+If set, extra checks are made during IO operations.  Currently, this
+includes only advisory locks around file writes.
+.TP
+.I "MONO_THEME"
+The name of the theme to be used by Windows.Forms.   Available themes today
+include "clearlooks", "nice" and "win32".
+.Sp
+The default is "win32".  
 .TP
 .I "MONO_THREADS_PER_CPU"
 The maximum number of threads in the general threadpool will be
 20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
 variable is 5.
 .TP
+.I "MONO_XMLSERIALIZER_THS"
+Controls the threshold for the XmlSerializer to produce a custom
+serializer for a given class instead of using the Reflection-based
+interpreter.  The possible values are `no' to disable the use of a
+custom serializer or a number to indicate when the XmlSerializer
+should start serializing.   The default value is 50, which means that
+the a custom serializer will be produced on the 50th use.
+.SH ENVIRONMENT VARIABLES FOR DEBUGGING
+.TP
+.I "MONO_ASPNET_NODELETE"
+If set to any value, temporary source files generated by ASP.NET support
+classes will not be removed. They will be kept in the user's temporary
+directory.
+.TP
+.I "MONO_LOG_LEVEL"
+The logging level, possible values are `error', `critical', `warning',
+`message', `info' and `debug'.  See the DEBUGGING section for more
+details.
+.TP
+.I "MONO_LOG_MASK"
+Controls the domain of the Mono runtime that logging will apply to. 
+If set, the log mask is changed to the set value. Possible values are
+"asm" (assembly loader), "type", "dll" (native library loader), "gc"
+(garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
+The default value is "all". Changing the mask value allows you to display only 
+messages for a certain component. You can use multiple masks by comma 
+separating them. For example to see config file messages and assembly loader
+messages set you mask to "asm,cfg".
+.TP
 .I "MONO_TRACE"
 Used for runtime tracing of method calls. The format of the comma separated
 trace options is:
@@ -629,64 +740,75 @@ be used when writing messages like this: Console.Error:MyProgramName.
 See the System.Diagnostics.DefaultTraceListener documentation for more
 information.
 .TP
-.I "MONO_DISABLE_MANAGED_COLLATION"
-If this environment variable is `yes', the runtime uses unmanaged
-collation (which actually means no culture-sensitive collation). It
-internally disables managed collation functionality invoked via the
-members of System.Globalization.CompareInfo class. Collation is
-enabled by default.
+.I "MONO_XEXCEPTIONS"
+This throws an exception when a X11 error is encountered; by default a
+message is displayed but execution continues
 .TP
-.I "MONO_XMLSERIALIZER_THS"
-Controls the threshold for the XmlSerializer to produce a custom
-serializer for a given class instead of using the Reflection-based
-interpreter.  The possible values are `no' to disable the use of a
-custom serializer or a number to indicate when the XmlSerializer
-should start serializing.   The default value is 50, which means that
-the a custom serializer will be produced on the 50th use.
-.TP
-.I "MONO_STRICT_IO_EMULATION"
-If set, extra checks are made during IO operations.  Currently, this
-includes only advisory locks around file writes.
+.I "MONO_XSYNC"
+This is used in the System.Windows.Forms implementation when running
+with the X11 backend.  This is used to debug problems in Windows.Forms
+as it forces all of the commands send to X11 server to be done
+synchronously.   The default mode of operation is asynchronous which
+makes it hard to isolate the root of certain problems.
 .SH FILES
 On Unix assemblies are loaded from the installation lib directory.  If you set
 `prefix' to /usr, the assemblies will be located in /usr/lib.  On
 Windows, the assemblies are loaded from the directory where mono and
 mint live.
-.PP
-~/.mono/aot-cache
-.PP
+.TP
+.B ~/.mono/aot-cache
+.Sp
 The directory for the ahead-of-time compiler demand creation
 assemblies are located. 
-.PP
-/etc/mono/config, ~/.mono/config
-.PP
+.TP
+.B /etc/mono/config, ~/.mono/config
+.Sp
 Mono runtime configuration file.  See the mono-config(5) manual page
 for more information.
-.PP
-~/.config/.mono/certs, /usr/share/.mono/certs
-.PP
+.TP
+.B ~/.config/.mono/certs, /usr/share/.mono/certs
+.Sp
 Contains Mono certificate stores for users / machine. See the certmgr(1) 
 manual page for more information on managing certificate stores and
 the mozroots(1) page for information on how to import the Mozilla root
 certificates into the Mono certificate store. 
-.PP
-~/.config/.mono/keypairs, /usr/share/.mono/keypairs
-.PP
+.TP
+.B ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.config
+.Sp
+Files in this directory allow a user to customize the configuration
+for a given system assembly, the format is the one described in the
+mono-config(5) page. 
+.TP
+.B ~/.config/.mono/keypairs, /usr/share/.mono/keypairs
+.Sp
 Contains Mono cryptographic keypairs for users / machine. They can be 
 accessed by using a CspParameters object with DSACryptoServiceProvider
 and RSACryptoServiceProvider classes.
-.PP
-~/.config/.isolatedstorage, ~/.local/share/.isolatedstorage, /usr/share/.isolatedstorage
-.PP
+.TP
+.B ~/.config/.isolatedstorage, ~/.local/share/.isolatedstorage, /usr/share/.isolatedstorage
+.Sp
 Contains Mono isolated storage for non-roaming users, roaming users and 
 local machine. Isolated storage can be accessed using the classes from 
 the System.IO.IsolatedStorage namespace.
+.TP
+.B <assembly>.config
+.Sp
+Configuration information for individual assemblies is loaded by the
+runtime from side-by-side files with the .config files, see the
+http://www.mono-project.com/Config for more information.
+.TP
+.B Web.config, web.config
+.Sp
+ASP.NET applications are configured through these files, the
+configuration is done on a per-directory basis.  For more information
+on this subject see the http://www.mono-project.com/Config_system.web
+page. 
 .SH MAILING LISTS
 Mailing lists are listed at the
 http://www.mono-project.com/Mailing_Lists
 .SH WEB SITE
 http://www.mono-project.com
 .SH SEE ALSO
-.BR certmgr(1), mcs(1), mint(1), monodis(1), mono-config(5), mozroots(1).
+.BR certmgr(1), mcs(1), mint(1), monodis(1), mono-config(5), mozroots(1), xsp(1).
 .PP
 For ASP.NET-related documentation, see the xsp(1) manual page