- If the window is resized and scrolling is no longer needed
[mono-project.git] / man / mono.1
blobc828cc1a709649ae924be9445159a85d8efb23a4
1 .\" 
2 .\" mono manual page.
3 .\" (C) 2003 Ximian, Inc. 
4 .\" (C) 2004-2005 Novell, Inc. 
5 .\" Author:
6 .\"   Miguel de Icaza (miguel@gnu.org)
7 .\"
8 .de Sp \" Vertical space (when we can't use .PP)
9 .if t .sp .5v
10 .if n .sp
12 .TH Mono "Mono 1.0"
13 .SH NAME
14 mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
15 .SH SYNOPSIS
16 .PP
17 .B mono [options] file [arguments...]
18 .SH DESCRIPTION
19 \fImono\fP is a runtime implementation of the ECMA Common Language
20 Infrastructure.  This can be used to run ECMA and .NET applications.
21 .PP
22 The runtime contains a native code generator that transforms the
23 Common Intermediate Language into native code.
24 .PP
25 The code generator can operate in two modes: just in time compilation
26 (JIT) or ahead of time compilation (AOT).  Since code can be
27 dynamically loaded, the runtime environment and the JIT are always
28 present, even if code is compiled ahead of time.
29 .PP
30 The runtime loads ths specified
31 .I file
32 and optionally passes
33 the
34 .I arguments
35 to it.  The 
36 .I file
37 is an ECMA assembly.  They typically have a .exe or .dll extension.
38 .PP
39 The runtime provides a number of configuration options for running
40 applications, for developping and debugging, and for testing and
41 debugging the runtime itself.
42 .SH PORTABILITY
43 On Unix-based systems, Mono provides a mechanism to emulate the 
44 Windows-style file access, this includes providing a case insensitive
45 view of the file system, directory separator mapping (from \ to /) and
46 stripping the drive letters.
47 .PP
48 This functionality is enabled by setting the 
49 .B MONO_IOMAP 
50 environment variable to one of 
51 .B all, drive
52 and 
53 .B case.
54 .PP
55 See the description for 
56 .B MONO_IOMAP
57 in the environment variables section for more details.
58 .SH RUNTIME OPTIONS
59 The following options are available:
60 .TP
61 .I "--aot"
62 This option is used to precompile the CIL code in the specified
63 assembly to native code.  The generated code is stored in a file with
64 the extension .so.  This file will be automatically picked up by the
65 runtime when the assembly is executed.  
66 .Sp 
67 Ahead-of-Time compilation is most useful if you use it in combination
68 with the -O=all,-shared flag which enables all of the optimizations in
69 the code generator to be performed.  Some of those optimizations are
70 not practical for Just-in-Time compilation since they might be very
71 time consuming.
72 .Sp
73 Unlike the .NET Framework, Ahead-of-Time compilation will not generate
74 domain independent code: it generates the same code that the
75 Just-in-Time compiler would produce.   Since most applications use a
76 single domain, this is fine.   If you want to optimize the generated
77 code for use in multi-domain applications, consider using the
78 -O=shared flag.
79 .Sp
80 This pre-compiles the methods, but the original assembly is still
81 required to execute as this one contains the metadata and exception
82 information which is not availble on the generated file.  When
83 precompiling code, you might want to compile with all optimizations
84 (-O=all).  Pre-compiled code is position independent code.
85 .Sp
86 Pre compilation is just a mechanism to reduce startup time, increase
87 code sharing across multiple mono processes and avoid just-in-time
88 compilation program startup costs.  The original assembly must still
89 be present, as the metadata is contained there.
90 .Sp
91 For more information about AOT, see: http://www.mono-project.com/AOT
92 .TP
93 .I "--config filename"
94 Load the specified configuration file instead of the default one(s).
95 The default files are /etc/mono/config and ~/.mono/config or the file
96 specified in the MONO_CONFIG environment variable, if set.  See the
97 mono-config(5) man page for details on the format of this file.
98 .TP
99 .I "--desktop"
100 Configures the virtual machine to be better suited for desktop
101 applications.  Currently this sets the GC system to avoid expanding
102 the heap as much as possible at the expense of slowing down garbage
103 collection a bit.
105 .I "--help", "-h"
106 Displays usage instructions.
108 .I "--optimize=MODE", "-O=MODE"
109 MODE is a comma separated list of optimizations.  They also allow
110 optimizations to be turned off by prefixing the optimization name with
111 a minus sign.
113 The following optimizations are implemented:
115              all        Turn on all optimizations
116              peephole   Peephole postpass
117              branch     Branch optimizations
118              inline     Inline method calls
119              cfold      Constant folding
120              consprop   Constant propagation
121              copyprop   Copy propagation
122              deadce     Dead code elimination
123              linears    Linear scan global reg allocation
124              cmov       Conditional moves
125              shared     Emit per-domain code
126              sched      Instruction scheduling
127              intrins    Intrinsic method implementations
128              tailc      Tail recursion and tail calls
129              loop       Loop related optimizations
130              fcmov      Fast x86 FP compares
131              leaf       Leaf procedures optimizations
132              aot        Usage of Ahead Of Time compiled code
133              precomp    Precompile all methods before executing Main
134              abcrem     Array bound checks removal
135              ssapre     SSA based Partial Redundancy Elimination
138 For example, to enable all the optimization but dead code
139 elimination and inlining, you can use:
141         -O=all,-deadce,-inline
144 .I "--runtime=VERSION"
145 Mono supports different runtime versions. The version used depends on the program
146 that is being run or on its configuration file (named program.exe.config). This option
147 can be used to override such autodetection, by forcing a different runtime version
148 to be used. Note that this should only be used to select a later compatible runtime
149 version than the one the program was compiled against. A typical usage is for
150 running a 1.1 program on a 2.0 version:
152          mono --runtime=v2.0.50727 program.exe
155 .I "--security"
156 Activate the security manager (experimental feature in 1.1). This allows 
157 mono to support declarative security attributes (e.g. execution of, CAS 
158 or non-CAS, security demands). The security manager is OFF by default 
159 (experimental).
161 .I "--server"
162 Configures the virtual machine to be better suited for server
163 operations.  
165 .I "-V", "--version"
166 Prints JIT version information.
169 .SH DEVELOPMENT OPTIONS
170 The following options are used to help when developing a JITed application.
172 .I "--debug"
173 Turns on the debugging mode in the runtime.  If an assembly was
174 compiled with debugging information, it will produce line number
175 information for stack traces. 
177 .I "--profile[=profiler[:profiler_args]]"
178 Turns on profiling.  For more information about profiling applications
179 and code coverage see the sections "PROFILING" and "CODE COVERAGE"
180 below. 
182 .I "--trace[=expression]"
183 Shows method names as they are invoked.  By default all methods are
184 traced. 
186 The trace can be customized to include or exclude methods, classes or
187 assemblies.  A trace expression is a comma separated list of targets,
188 each target can be prefixed with a minus sign to turn off a particular
189 target.  The words `program', `all' and `disabled' have special
190 meaning.  `program' refers to the main program being executed, and
191 `all' means all the method calls.
193 The `disabled' option is used to start up with tracing disabled.  It
194 can be enabled at a later point in time in the program by sending the
195 SIGUSR2 signal to the runtime.
197 Assemblies are specified by their name, for example, to trace all
198 calls in the System assembly, use:
201         mono --trace=System app.exe
204 Classes are specified with the T: prefix.  For example, to trace all
205 calls to the System.String class, use:
208         mono --trace=T:System.String app.exe
211 And individual methods are referenced with the M: prefix, and the
212 standar method notation:
215         mono --trace=M:System.Console:WriteLine app.exe
218 As previously noted, various rules can be specified at once:
221         mono --trace=T:System.String,T:System.Random app.exe
224 You can exclude pieces, the next example traces calls to
225 System.String except for the System.String:Concat method.
228         mono --trace=T:System.String,-M:System.String:Concat
231 Finally, namespaces can be specified using the N: prefix:
234         mono --trace=N:System.Xml
237 .SH JIT MAINTAINER OPTIONS
238 The maintainer options are only used by those developing the runtime
239 itself, and not typically of interest to runtime users or developers.
241 .I "--break method"
242 Inserts a breakpoint before the method whose name is `method'
243 (namespace.class:methodname).  Use `Main' as method name to insert a
244 breakpoint on the application's main method.
246 .I "--breakonex"
247 Inserts a breakpoint on exceptions.  This allows you to debug your
248 application with a native debugger when an exception is thrown.
250 .I "--compile name"
251 This compiles a method (namespace.name:methodname), this is used for
252 testing the compiler performance or to examine the output of the code
253 generator. 
255 .I "--compileall"
256 Compiles all the methods in an assembly.  This is used to test the
257 compiler performance or to examine the output of the code generator
258 .TP 
259 .I "--graph=TYPE METHOD"
260 This generates a postscript file with a graph with the details about
261 the specified method (namespace.name:methodname).  This requires `dot'
262 and ghostview to be installed (it expects Ghostview to be called
263 "gv"). 
265 The following graphs are available:
267           cfg        Control Flow Graph (CFG)
268           dtree      Dominator Tree
269           code       CFG showing code
270           ssa        CFG showing code after SSA translation
271           optcode    CFG showing code after IR optimizations
274 Some graphs will only be available if certain optimizations are turned
277 .I "--ncompile"
278 Instruct the runtime on the number of times that the method specified
279 by --compile (or all the methods if --compileall is used) to be
280 compiled.  This is used for testing the code generator performance. 
281 .TP 
282 .I "--stats"
283 Displays information about the work done by the runtime during the
284 execution of an application. 
286 .I "--wapi=hps|semdel"
287 Perform maintenance of the process shared data.
289 semdel will delete the global semaphore.
291 hps will list the currently used handles.
293 .I "-v", "--verbose"
294 Increases the verbosity level, each time it is listed, increases the
295 verbosity level to include more information (including, for example, 
296 a disassembly of the native code produced, code selector info etc.).
297 .SH PROFILING
298 The mono runtime includes a profiler that can be used to explore
299 various performance related problems in your application.  The
300 profiler is activated by passing the --profile command line argument
301 to the Mono runtime, the format is:
304         --profile[=profiler[:profiler_args]]
307 Mono has a built-in profiler called 'default' (and is also the default
308 if no arguments are specified), but developers can write custom
309 profilers, see the section "CUSTOM PROFILERS" for more details.
311 If a 
312 .I profiler 
313 is not specified, the default profiler is used.
315 The 
316 .I profiler_args 
317 is a profiler-specific string of options for the profiler itself.
319 The default profiler accepts the following options 'alloc' to profile
320 memory consumption by the application; 'time' to profile the time
321 spent on each routine; 'jit' to collect time spent JIT-compiling methods
322 and 'stat' to perform sample statistical profiling.
323 If no options are provided the default is 'alloc,time,jit'. 
325 By default the
326 profile data is printed to stdout: to change this, use the 'file=filename'
327 option to output the data to filename.
329 For example:
332         mono --profile program.exe
336 That will run the program with the default profiler and will do time
337 and allocation profiling.
341         mono --profile=default:stat,alloc,file=prof.out program.exe
344 Will do  sample statistical profiling and allocation profiling on
345 program.exe. The profile data is put in prof.out.
347 Note that the statistical profiler has a very low overhead and should
348 be the preferred profiler to use (for better output use the full path
349 to the mono binary when running and make sure you have installed the
350 addr2line utility that comes from the binutils package).
351 .SH PROFILERS
352 There are a number of external profilers that have been developed for
353 Mono, we will update this section to contain the profilers.
355 The heap Shot profiler can track all live objects, and references to
356 these objects, and includes a GUI tool, this is our recommended
357 profiler.
358 To install you must download the profiler
359 from Mono's SVN:
361         svn co svn://svn.myrealbox.com/source/trunk/heap-shot
362         cd heap-shot
363         ./autogen
364         make
365         make install
368 See the included documentation for details on using it.
370 The Live Type profiler shows at every GC iteration all of the live
371 objects of a given type.   To install you must download the profiler
372 from Mono's SVN:
374         svn co svn://svn.myrealbox.com/source/trunk/heap-prof
375         cd heap-prof
376         ./autogen
377         make
378         make install
381 To use the profiler, execute:
383         mono --profile=desc-heap program.exe
386 The output of this profiler looks like this:
388         Checkpoint at 102 for heap-resize
389            System.MonoType : 708
390            System.Threading.Thread : 352
391            System.String : 3230
392            System.String[] : 104
393            Gnome.ModuleInfo : 112
394            System.Object[] : 160
395            System.Collections.Hashtable : 96
396            System.Int32[] : 212
397            System.Collections.Hashtable+Slot[] : 296
398            System.Globalization.CultureInfo : 108
399            System.Globalization.NumberFormatInfo : 144
402 The first line describes the iteration number for the GC, in this case
403 checkpoint 102.
405 Then on each line the type is displayed as well as the number of bytes
406 that are being consumed by live instances of this object.
407 .PP 
408 The AOT profiler is used to feed back information to the AOT compiler
409 about how to order code based on the access patterns for pages.  To
410 use it, use:
412         mono --profile=aot program.exe
414 The output of this profile can be fed back into Mono's AOT compiler to
415 order the functions on the disk to produce precompiled images that
416 have methods in sequential pages.
417 .SH CUSTOM PROFILERS
418 Mono provides a mechanism for loading other profiling modules which in
419 the form of shared libraries.  These profiling modules can hook up to
420 various parts of the Mono runtime to gather information about the code
421 being executed.
423 To use a third party profiler you must pass the name of the profiler
424 to Mono, like this:
427         mono --profile=custom program.exe
431 In the above sample Mono will load the user defined profiler from the
432 shared library `mono-profiler-custom.so'.  This profiler module must
433 be on your dynamic linker library path.
434 .PP 
435 A list of other third party profilers is available from Mono's web
436 site (www.mono-project.com/Performance_Tips)
438 Custom profiles are written as shared libraries.  The shared library
439 must be called `mono-profiler-NAME.so' where `NAME' is the name of
440 your profiler.
442 For a sample of how to write your own custom profiler look in the
443 Mono source tree for in the samples/profiler.c.
444 .SH CODE COVERAGE
445 Mono ships with a code coverage module.  This module is activated by
446 using the Mono --profile=cov option.  The format is:
447 .I "--profile=cov[:assembly-name[/namespace]] test-suite.exe"
449 By default code coverage will default to all the assemblies loaded,
450 you can limit this by specifying the assembly name, for example to
451 perform code coverage in the routines of your program use, for example
452 the following command line limits the code coverage to routines in the
453 "demo" assembly:
456         mono --profile=cov:demo demo.exe
460 Notice that the 
461 .I assembly-name
462 does not include the extension.
464 You can further restrict the code coverage output by specifying a
465 namespace:
468         mono --profile=cov:demo/My.Utilities demo.exe
472 Which will only perform code coverage in the given assembly and
473 namespace.  
475 Typical output looks like this:
478         Not covered: Class:.ctor ()
479         Not covered: Class:A ()
480         Not covered: Driver:.ctor ()
481         Not covered: Driver:method ()
482         Partial coverage: Driver:Main ()
483                 offset 0x000a
487 The offsets displayed are IL offsets.
489 A more powerful coverage tool is available in the module `monocov'.
490 See the monocov(1) man page for details.
491 .SH DEBUGGING
492 It is possible to obtain a stack trace of all the active threads in
493 Mono by sending the QUIT signal to Mono, you can do this from the
494 command line, like this:
496         kill -QUIT pid
498 Where pid is the Process ID of the Mono process you want to examine.
499 The process will continue running afterwards.
501 You can use the MONO_LOG_LEVEL and MONO_LOG_MASK environment variables
502 to get verbose debugging output about the execution of your
503 application within Mono.
505 The 
506 .I MONO_LOG_LEVEL
507 environment variable if set, the logging level is changed to the set
508 value. Possible values are "error", "critical", "warning", "message",
509 "info", "debug". The default value is "error". Messages with a logging
510 level greater then or equal to the log level will be printed to
511 stdout/stderr.
513 Use "info" to track the dynamic loading of assemblies.
516 Use the 
517 .I MONO_LOG_MASK
518 environment variable to limit the extent of the messages you get: 
519 If set, the log mask is changed to the set value. Possible values are
520 "asm" (assembly loader), "type", "dll" (native library loader), "gc"
521 (garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
522 The default value is "all". Changing the mask value allows you to display only 
523 messages for a certain component. You can use multiple masks by comma 
524 separating them. For example to see config file messages and assembly loader
525 messages set you mask to "asm,cfg".
527 The following is a common use to track down problems with P/Invoke:
530         $ MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono glue.exe
534 .SH SERIALIZATION
535 Mono's XML serialization engine by default will use a reflection-based
536 approach to serialize which might be slow for continous processing
537 (web service applications).  The serialization engine will determine
538 when a class must use a hand-tuned serializer based on a few
539 parameters and if needed it will produce a customized C# serializer
540 for your types at runtime.  This customized serializer then gets
541 dynamically loaded into your application.
543 You can control this with the MONO_XMLSERIALIZER_THS environment
544 variable.
546 The possible values are 
547 .B `no' 
548 to disable the use of a C# customized
549 serializer, or an integer that is the minimum number of uses before
550 the runtime will produce a custom serializer (0 will produce a
551 custom serializer on the first access, 50 will produce a serializer on
552 the 50th use). Mono will fallback to an interpreted serializer if the
553 serializer generation somehow fails. This behavior can be disabled
554 by setting the option
555 .B `nofallback'
556 (for example: MONO_XMLSERIALIZER_THS=0,nofallback).
557 .SH ENVIRONMENT VARIABLES
559 .I "GC_DONT_GC"
560 Turns off the garbage collection in Mono.  This should be only used
561 for debugging purposes
563 .I "MONO_AOT_CACHE"
564 If set, this variable will instruct Mono to ahead-of-time compile new
565 assemblies on demand and store the result into a cache in
566 ~/.mono/aot-cache. 
568 .I "MONO_CFG_DIR"
569 If set, this variable overrides the default system configuration directory
570 ($PREFIX/etc). It's used to locate machine.config file.
572 .I "MONO_CONFIG"
573 If set, this variable overrides the default runtime configuration file
574 ($PREFIX/etc/mono/config). The --config command line options overrides the
575 environment variable.
577 .I "MONO_DEBUG"
578 If set, enables some features of the runtime useful for debugging.
579 This variable should contain a comma separated list of debugging options.
580 Currently, the following options are supported:
582 .ne 8
584 .I "collect-pagefault-stats"
585 Collects information about pagefaults.   This is used internally to
586 track the number of page faults produced to load metadata.  To display
587 this information you must use this option with "--stats" command line option.
589 .I "handle-sigint"
590 Captures the interrupt signal (Control-C) and displays a stack trace
591 when pressed.  Useful to find out where the program is executing at a
592 given point.  This only displays the stack trace of a single thread. 
594 .I "keep-delegates"
595 This option will leak delegate trampolines that are no longer
596 referenced as to present the user with more information about a
597 delegate missuse.  Basically a delegate instance might be created,
598 passed to unmanaged code, and no references kept in managed code,
599 which will garbage collect the code.  With this option it is possible
600 to track down the source of the problems. 
602 .I "break-on-unverified"
603 If this variable is set, when the Mono VM runs into a verification
604 problem, instead of throwing an exception it will break into the
605 debugger.  This is useful when debugging verifier problems
609 .I "MONO_DISABLE_AIO"
610 If set, tells mono NOT to attempt using native asynchronous I/O services. In
611 that case, a default select/poll implementation is used. Currently only epoll()
612 is supported.
614 .I "MONO_DISABLE_MANAGED_COLLATION"
615 If this environment variable is `yes', the runtime uses unmanaged
616 collation (which actually means no culture-sensitive collation). It
617 internally disables managed collation functionality invoked via the
618 members of System.Globalization.CompareInfo class. Collation is
619 enabled by default.
621 .I "MONO_EGD_SOCKET"
622 For platforms that do not otherwise have a way of obtaining random bytes
623 this can be set to the name of a file system socket on which an egd or
624 prngd daemon is listening.
626 .I "MONO_EVENTLOG_TYPE"
627 Sets the type of event log provider to use (for System.Diagnostics.EventLog).
629 Possible values are:
632 .I "local[:path]"
634 Persists event logs and entries to the local file system.
636 The directory in which to persit the event logs, event sources and entries
637 can be specified as part of the value.
639 If the path is not explicitly set, it defaults to "/var/lib/mono/eventlog"
640 on unix and "%APPDATA%\mono\eventlog" on Windows.
642 .I "win32"
644 .B 
645 Uses the native win32 API to write events and registers event logs and
646 event sources in the registry.   This is only available on Windows. 
648 On Unix, the directory permission for individual event log and event source
649 directories is set to 777 (with +t bit) allowing everyone to read and write
650 event log entries while only allowing entries to be deleted by the user(s)
651 that created them.
653 .I "null"
655 Silently discards any events.
658 The default is "null" on Unix (and versions of Windows before NT), and 
659 "win32" on Windows NT (and higher).
662 .I "MONO_EXTERNAL_ENCODINGS"
663 If set, contains a colon-separated list of text encodings to try when
664 turning externally-generated text (e.g. command-line arguments or
665 filenames) into Unicode.  The encoding names come from the list
666 provided by iconv, and the special case "default_locale" which refers
667 to the current locale's default encoding.
669 When reading externally-generated text strings UTF-8 is tried first,
670 and then this list is tried in order with the first successful
671 conversion ending the search.  When writing external text (e.g. new
672 filenames or arguments to new processes) the first item in this list
673 is used, or UTF-8 if the environment variable is not set.
675 The problem with using MONO_EXTERNAL_ENCODINGS to process your
676 files is that it results in a problem: although its possible to get
677 the right file name it is not necessarily possible to open the file.
678 In general if you have problems with encodings in your filenames you
679 should use the "convmv" program.
681 .I "MONO_GAC_PREFIX"
682 Provides a prefix the runtime uses to look for Global Assembly Caches.
683 Directories are separated by the platform path separator (colons on
684 unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
685 install. Or to the directory provided in the gacutil /gacdir command. Example:
686 .B /home/username/.mono:/usr/local/mono/
688 .I "MONO_IOMAP"
689 Enables some filename rewriting support to assist badly-written
690 applications that hard-code Windows paths.  Set to a colon-separated
691 list of "drive" to strip drive letters, or "case" to do
692 case-insensitive file matching in every directory in a path.  "all"
693 enables all rewriting methods.  (Backslashes are always mapped to
694 slashes if this variable is set to a valid option.)
697 For example, this would work from the shell:
700         MONO_IOMAP=drive:case
701         export MONO_IOMAP
704 If you are using mod_mono to host your web applications, you can use
705 the 
706 .B MonoSetEnv
707 directive, like this:
710         MonoSetEnv MONO_IOMAP=all
714 .I "MONO_MANAGED_WATCHER"
715 If set to any value, System.IO.FileSystemWatcher will use the default
716 managed implementation (slow). If unset, mono will try to use FAM under
717 Unix systems and native API calls on Windows, falling back to the
718 managed implementation on error.
720 .I "MONO_PATH"
721 Provides a search path to the runtime where to look for library
722 files.   This is a tool convenient for debugging applications, but
723 should not be used by deployed applications as it breaks the assembly
724 loader in subtle ways. 
726 Directories are separated by the platform path separator (colons on unix). Example:
727 .B /home/username/lib:/usr/local/mono/lib
729 Alternative solutions to MONO_PATH include: installing libraries into
730 the Global Assembly Cache (see gacutil(1)) or having the dependent
731 libraries side-by-side with the main executable.
733 For a complete description of recommended practices for application
734 deployment, see the
735 http://www.mono-project.com/Guidelines:Application_Deployment page. 
737 .I "MONO_RTC"
738 Experimental RTC support in the statistical profiler: if the user has
739 the permission, more accurate statistics are gathered.  The MONO_RTC
740 value must be restricted to what the linux rtc allows: power of two
741 from 64 to 8192 Hz. To enable higher frequencies like 4096 Hz, run as root:
744         echo 4096 > /proc/sys/dev/rtc/max-user-freq
748 For example:
751         MONO_RTC=4096 mono --profiler=default:stat program.exe
755 .I "MONO_NO_TLS"
756 Disable inlining of thread local accesses. Try setting this if you get a segfault
757 early on in the execution of mono.
758 .TP 
759 .I "MONO_SHARED_DIR"
760 If set its the directory where the ".wapi" handle state is stored.
761 This is the directory where the Windows I/O Emulation layer stores its
762 shared state data (files, events, mutexes, pipes).  By default Mono
763 will store the ".wapi" directory in the users's home directory.
764 .TP 
765 .I "MONO_SHARED_HOSTNAME"
766 Uses the string value of this variable as a replacement for the host name when
767 creating file names in the ".wapi" directory. This helps if the host name of
768 your machine is likely to be changed when a mono application is running or if
769 you have a .wapi directory shared among several different computers.
771 Mono typically uses the hostname to create the files that are used to
772 share state across multiple Mono processes.  This is done to support
773 home directories that might be shared over the network.
775 .I "MONO_STRICT_IO_EMULATION"
776 If set, extra checks are made during IO operations.  Currently, this
777 includes only advisory locks around file writes.
779 .I "MONO_THEME"
780 The name of the theme to be used by Windows.Forms.   Available themes today
781 include "clearlooks", "nice" and "win32".
783 The default is "win32".  
785 .I "MONO_TLS_SESSION_CACHE_TIMEOUT"
786 The time, in seconds, that the SSL/TLS session cache will keep it's entry to
787 avoid a new negotiation between the client and a server. Negotiation are very
788 CPU intensive so an application-specific custom value may prove useful for 
789 small embedded systems.
791 The default is 180 seconds.
793 .I "MONO_THREADS_PER_CPU"
794 The maximum number of threads in the general threadpool will be
795 20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
796 variable is 5.
798 .I "MONO_XMLSERIALIZER_THS"
799 Controls the threshold for the XmlSerializer to produce a custom
800 serializer for a given class instead of using the Reflection-based
801 interpreter.  The possible values are `no' to disable the use of a
802 custom serializer or a number to indicate when the XmlSerializer
803 should start serializing.   The default value is 50, which means that
804 the a custom serializer will be produced on the 50th use.
806 .I "MONO_XMLSERIALIZER_DEBUG"
807 Set this value to 1 to prevent the serializer from removing the
808 temporary files that are created for fast serialization;  This might
809 be useful when debugging.
810 .SH ENVIRONMENT VARIABLES FOR DEBUGGING
812 .I "MONO_ASPNET_NODELETE"
813 If set to any value, temporary source files generated by ASP.NET support
814 classes will not be removed. They will be kept in the user's temporary
815 directory.
817 .I "MONO_LOG_LEVEL"
818 The logging level, possible values are `error', `critical', `warning',
819 `message', `info' and `debug'.  See the DEBUGGING section for more
820 details.
822 .I "MONO_LOG_MASK"
823 Controls the domain of the Mono runtime that logging will apply to. 
824 If set, the log mask is changed to the set value. Possible values are
825 "asm" (assembly loader), "type", "dll" (native library loader), "gc"
826 (garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
827 The default value is "all". Changing the mask value allows you to display only 
828 messages for a certain component. You can use multiple masks by comma 
829 separating them. For example to see config file messages and assembly loader
830 messages set you mask to "asm,cfg".
832 .I "MONO_TRACE"
833 Used for runtime tracing of method calls. The format of the comma separated
834 trace options is:
837         [-]M:method name
838         [-]N:namespace
839         [-]T:class name
840         [-]all
841         [-]program
842         disabled                Trace output off upon start.
845 You can toggle trace output on/off sending a SIGUSR2 signal to the program.
847 .I "MONO_TRACE_LISTENER"
848 If set, enables the System.Diagnostics.DefaultTraceListener, which will 
849 print the output of the System.Diagnostics Trace and Debug classes.  
850 It can be set to a filename, and to Console.Out or Console.Error to display
851 output to standard output or standard error, respectively. If it's set to
852 Console.Out or Console.Error you can append an optional prefix that will
853 be used when writing messages like this: Console.Error:MyProgramName.
854 See the System.Diagnostics.DefaultTraceListener documentation for more
855 information.
857 .I "MONO_XEXCEPTIONS"
858 This throws an exception when a X11 error is encountered; by default a
859 message is displayed but execution continues
861 .I "MONO_XSYNC"
862 This is used in the System.Windows.Forms implementation when running
863 with the X11 backend.  This is used to debug problems in Windows.Forms
864 as it forces all of the commands send to X11 server to be done
865 synchronously.   The default mode of operation is asynchronous which
866 makes it hard to isolate the root of certain problems.
867 .SH VALGRIND
868 If you want to use Valgrind, you will find the file `mono.supp'
869 useful, it contains the suppressions for the GC which trigger
870 incorrect warnings.  Use it like this:
872     valgrind --suppressions=mono.supp mono ...
874 .SH FILES
875 On Unix assemblies are loaded from the installation lib directory.  If you set
876 `prefix' to /usr, the assemblies will be located in /usr/lib.  On
877 Windows, the assemblies are loaded from the directory where mono and
878 mint live.
880 .B ~/.mono/aot-cache
882 The directory for the ahead-of-time compiler demand creation
883 assemblies are located. 
885 .B /etc/mono/config, ~/.mono/config
887 Mono runtime configuration file.  See the mono-config(5) manual page
888 for more information.
890 .B ~/.config/.mono/certs, /usr/share/.mono/certs
892 Contains Mono certificate stores for users / machine. See the certmgr(1) 
893 manual page for more information on managing certificate stores and
894 the mozroots(1) page for information on how to import the Mozilla root
895 certificates into the Mono certificate store. 
897 .B ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.config
899 Files in this directory allow a user to customize the configuration
900 for a given system assembly, the format is the one described in the
901 mono-config(5) page. 
903 .B ~/.config/.mono/keypairs, /usr/share/.mono/keypairs
905 Contains Mono cryptographic keypairs for users / machine. They can be 
906 accessed by using a CspParameters object with DSACryptoServiceProvider
907 and RSACryptoServiceProvider classes.
909 .B ~/.config/.isolatedstorage, ~/.local/share/.isolatedstorage, /usr/share/.isolatedstorage
911 Contains Mono isolated storage for non-roaming users, roaming users and 
912 local machine. Isolated storage can be accessed using the classes from 
913 the System.IO.IsolatedStorage namespace.
915 .B <assembly>.config
917 Configuration information for individual assemblies is loaded by the
918 runtime from side-by-side files with the .config files, see the
919 http://www.mono-project.com/Config for more information.
921 .B Web.config, web.config
923 ASP.NET applications are configured through these files, the
924 configuration is done on a per-directory basis.  For more information
925 on this subject see the http://www.mono-project.com/Config_system.web
926 page. 
927 .SH MAILING LISTS
928 Mailing lists are listed at the
929 http://www.mono-project.com/Mailing_Lists
930 .SH WEB SITE
931 http://www.mono-project.com
932 .SH SEE ALSO
934 certmgr(1), mcs(1), monocov(1), monodis(1), mono-config(5), mozroots(1), xsp(1).
936 For more information on AOT:
937 http://www.mono-project.com/AOT
939 For ASP.NET-related documentation, see the xsp(1) manual page