New test.
[mono.git] / man / mono.1
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
11 ..
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 RUNTIME OPTIONS
43 The following options are available:
44 .TP
45 .I "--aot"
46 This option is used to precompile the CIL code in the specified
47 assembly to native code.  The generated code is stored in a file with
48 the extension .so.  This file will be automatically picked up by the
49 runtime when the assembly is executed.  
50 .Sp 
51 Ahead-of-Time compilation is most useful if you use it in combination
52 with the -O=all,-shared flag which enables all of the optimizations in
53 the code generator to be performed.  Some of those optimizations are
54 not practical for Just-in-Time compilation since they might be very
55 time consuming.
56 .Sp
57 Unlike the .NET Framework, Ahead-of-Time compilation will not generate
58 domain independent code: it generates the same code that the
59 Just-in-Time compiler would produce.   Since most applications use a
60 single domain, this is fine.   If you want to optimize the generated
61 code for use in multi-domain applications, consider using the
62 -O=shared flag.
63 .Sp
64 This pre-compiles the methods, but the original assembly is still
65 required to execute as this one contains the metadata and exception
66 information which is not availble on the generated file.  When
67 precompiling code, you might want to compile with all optimizations
68 (-O=all).  Pre-compiled code is position independent code.
69 .Sp
70 Pre compilation is just a mechanism to reduce startup time, and avoid
71 just-in-time compilation costs.  The original assembly must still be
72 present, as the metadata is contained there.
73 .TP
74 .I "--config filename"
75 Load the specified configuration file instead of the default one(s).
76 The default files are /etc/mono/config and ~/.mono/config or the file
77 specified in the MONO_CONFIG environment variable, if set.  See the
78 mono-config(5) man page for details on the format of this file.
79 .TP
80 .I "--desktop"
81 Configures the virtual machine to be better suited for desktop
82 applications.  Currently this sets the GC system to avoid expanding
83 the heap as much as possible at the expense of slowing down garbage
84 collection a bit.
85 .TP
86 .I "--help", "-h"
87 Displays usage instructions.
88 .TP
89 .I "--optimize=MODE", "-O=mode"
90 MODE is a comma separated list of optimizations.  They also allow
91 optimizations to be turned off by prefixing the optimization name with
92 a minus sign.
93 .Sp
94 The following optimizations are implemented:
95 .nf
96              all        Turn on all optimizations
97              peephole   Peephole postpass
98              branch     Branch optimizations
99              inline     Inline method calls
100              cfold      Constant folding
101              consprop   Constant propagation
102              copyprop   Copy propagation
103              deadce     Dead code elimination
104              linears    Linear scan global reg allocation
105              cmov       Conditional moves
106              shared     Emit per-domain code
107              sched      Instruction scheduling
108              intrins    Intrinsic method implementations
109              tailc      Tail recursion and tail calls
110              loop       Loop related optimizations
111              fcmov      Fast x86 FP compares
112              leaf       Leaf procedures optimizations
113              aot        Usage of Ahead Of Time compiled code
114              precomp    Precompile all methods before executing Main
115              abcrem     Array bound checks removal
116              ssapre     SSA based Partial Redundancy Elimination
117 .fi
118 .Sp
119 For example, to enable all the optimization but dead code
120 elimination and inlining, you can use:
121 .nf
122         -O=all,-deadce,-inline
123 .fi
124 .TP
125 .I "--security"
126 Activate the security manager (experimental feature in 1.1). This allows 
127 mono to support declarative security attributes (e.g. execution of, CAS 
128 or non-CAS, security demands). The security manager is OFF by default 
129 (experimental).
130 .TP
131 .I "--server"
132 Configures the virtual machine to be better suited for server
133 operations.  
134 .TP
135 .I "-V", "--version"
136 Prints JIT version information.
137
138
139 .SH DEVELOPMENT OPTIONS
140 The following options are used to help when developing a JITed application.
141 .TP
142 .I "--debug"
143 Turns on the debugging mode in the runtime.  If an assembly was
144 compiled with debugging information, it will produce line number
145 information for stack traces. 
146 .TP
147 .I "--profile[=profiler[:profiler_args]]"
148 Turns on profiling.  For more information about profiling applications
149 and code coverage see the sections "PROFILING" and "CODE COVERAGE"
150 below. 
151 .TP
152 .I "--trace[=expression]"
153 Shows method names as they are invoked.  By default all methods are
154 traced. 
155 .Sp
156 The trace can be customized to include or exclude methods, classes or
157 assemblies.  A trace expression is a comma separated list of targets,
158 each target can be prefixed with a minus sign to turn off a particular
159 target.  The words `program' and `all' have special meaning.
160 `program' refers to the main program being executed, and `all' means
161 all the method calls. 
162 .Sp
163 Assemblies are specified by their name, for example, to trace all
164 calls in the System assembly, use:
165 .nf
166
167         mono --trace=System app.exe
168
169 .fi
170 Classes are specified with the T: prefix.  For example, to trace all
171 calls to the System.String class, use:
172 .nf
173
174         mono --trace=T:System.String app.exe
175
176 .fi
177 And individual methods are referenced with the M: prefix, and the
178 standar method notation:
179 .nf
180
181         mono --trace=M:System.Console:WriteLine app.exe
182
183 .fi
184 As previously noted, various rules can be specified at once:
185 .nf
186
187         mono --trace=T:System.String,T:System.Random app.exe
188
189 .fi
190 You can exclude pieces, the next example traces calls to
191 System.String except for the System.String:Concat method.
192 .nf
193
194         mono --trace=T:System.String,-M:System.String:Concat
195
196 .fi
197 Finally, namespaces can be specified using the N: prefix:
198 .nf
199
200         mono --trace=N:System.Xml
201
202 .fi
203 .SH JIT MAINTAINER OPTIONS
204 The maintainer options are only used by those developing the runtime
205 itself, and not typically of interest to runtime users or developers.
206 .TP
207 .I "--break method"
208 Inserts a breakpoint before the method whose name is `method'
209 (namespace.class:methodname).  Use `Main' as method name to insert a
210 breakpoint on the application's main method.
211 .TP
212 .I "--breakonex"
213 Inserts a breakpoint on exceptions.  This allows you to debug your
214 application with a native debugger when an exception is thrown.
215 .TP
216 .I "--compile name"
217 This compiles a method (namespace.name:methodname), this is used for
218 testing the compiler performance or to examine the output of the code
219 generator. 
220 .TP
221 .I "--compileall"
222 Compiles all the methods in an assembly.  This is used to test the
223 compiler performance or to examine the output of the code generator
224 .TP 
225 .I "--graph=TYPE METHOD"
226 This generates a postscript file with a graph with the details about
227 the specified method (namespace.name:methodname).  This requires `dot'
228 and ghostview to be installed (it expects Ghostview to be called
229 "gv"). 
230 .Sp
231 The following graphs are available:
232 .nf
233           cfg        Control Flow Graph (CFG)
234           dtree      Dominator Tree
235           code       CFG showing code
236           ssa        CFG showing code after SSA translation
237           optcode    CFG showing code after IR optimizations
238 .fi
239 .Sp
240 Some graphs will only be available if certain optimizations are turned
241 on.
242 .TP
243 .I "--ncompile"
244 Instruct the runtime on the number of times that the method specified
245 by --compile (or all the methods if --compileall is used) to be
246 compiled.  This is used for testing the code generator performance. 
247 .TP 
248 .I "--stats"
249 Displays information about the work done by the runtime during the
250 execution of an application. 
251 .TP
252 .I "--wapi=hps|semdel"
253 Perform maintenance of the process shared data.
254 .Sp
255 semdel will delete the global semaphore.
256 .Sp
257 hps will list the currently used handles.
258 .TP
259 .I "-v", "--verbose"
260 Increases the verbosity level, each time it is listed, increases the
261 verbosity level to include more information (including, for example, 
262 a disassembly of the native code produced, code selector info etc.).
263 .SH PROFILING
264 The mono runtime includes a profiler that can be used to explore
265 various performance related problems in your application.  The
266 profiler is activated by passing the --profile command line argument
267 to the Mono runtime, the format is:
268 .nf
269
270         --profile[=profiler[:profiler_args]]
271
272 .fi
273 Mono has a built-in profiler called 'default' (and is also the default
274 if no arguments are specified), but developers can write custom
275 profilers, see the section "CUSTOM PROFILERS" for more details.
276 .PP
277 If a 
278 .I profiler 
279 is not specified, the default profiler is used.
280 .Sp
281 The 
282 .I profiler_args 
283 is a profiler-specific string of options for the profiler itself.
284 .Sp
285 The default profiler accepts the following options 'alloc' to profile
286 memory consumption by the application; 'time' to profile the time
287 spent on each routine; 'jit' to collect time spent JIT-compiling methods
288 and 'stat' to perform sample statistical profiling.
289 If no options are provided the default is 'alloc,time,jit'. 
290 .PP
291 By default the
292 profile data is printed to stdout: to change this, use the 'file=filename'
293 option to output the data to filename.
294 .Sp
295 For example:
296 .nf
297
298         mono --profile program.exe
299
300 .fi
301 .Sp
302 That will run the program with the default profiler and will do time
303 and allocation profiling.
304 .Sp
305 .nf
306
307         mono --profile=default:stat,alloc,file=prof.out program.exe
308
309 .fi
310 Will do  sample statistical profiling and allocation profiling on
311 program.exe. The profile data is put in prof.out.
312 .Sp
313 Note that the statistical profiler has a very low overhead and should
314 be the preferred profiler to use (for better output use the full path
315 to the mono binary when running and make sure you have installed the
316 addr2line utility that comes from the binutils package).
317 .SH PROFILERS
318 There are a number of external profilers that have been developed for
319 Mono, we will update this section to contain the profilers.
320 .PP
321 The Live Type profiler shows at every GC iteration all of the live
322 objects of a given type.   To install you must download the profiler
323 from Mono's SVN:
324 .nf
325         svn co svn://svn.myrealbox.com/source/trunk/heap-prof
326         cd heap-prof
327         ./autogen
328         make
329         make install
330 .fi
331 .PP
332 To use the profiler, execute:
333 .nf
334         mono --profile=desc-heap program.exe
335 .fi
336 .PP
337 The output of this profiler looks like this:
338 .nf
339         Checkpoint at 102 for heap-resize
340            System.MonoType : 708
341            System.Threading.Thread : 352
342            System.String : 3230
343            System.String[] : 104
344            Gnome.ModuleInfo : 112
345            System.Object[] : 160
346            System.Collections.Hashtable : 96
347            System.Int32[] : 212
348            System.Collections.Hashtable+Slot[] : 296
349            System.Globalization.CultureInfo : 108
350            System.Globalization.NumberFormatInfo : 144
351 .fi
352 .PP
353 The first line describes the iteration number for the GC, in this case
354 checkpoint 102.
355 .PP
356 Then on each line the type is displayed as well as the number of bytes
357 that are being consumed by live instances of this object.
358 .SH CUSTOM PROFILERS
359 Mono provides a mechanism for loading other profiling modules which in
360 the form of shared libraries.  These profiling modules can hook up to
361 various parts of the Mono runtime to gather information about the code
362 being executed.  
363 .PP
364 To use a third party profiler you must pass the name of the profiler
365 to Mono, like this:
366 .nf
367
368         mono --profile=custom program.exe
369
370 .fi
371 .PP
372 In the above sample Mono will load the user defined profiler from the
373 shared library `mono-profiler-custom.so'.  This profiler module must
374 be on your dynamic linker library path.
375 .PP 
376 A list of other third party profilers is available from Mono's web
377 site (www.mono-project.com/Performance_Tips)
378 .PP
379 Custom profiles are written as shared libraries.  The shared library
380 must be called `mono-profiler-NAME.so' where `NAME' is the name of
381 your profiler.
382 .PP
383 For a sample of how to write your own custom profiler look in the
384 Mono source tree for in the samples/profiler.c.
385 .SH CODE COVERAGE
386 Mono ships with a code coverage module.  This module is activated by
387 using the Mono --profile=cov option.  The format is:
388 .I "--profile=cov[:assembly-name[/namespace]] test-suite.exe"
389 .PP
390 By default code coverage will default to all the assemblies loaded,
391 you can limit this by specifying the assembly name, for example to
392 perform code coverage in the routines of your program use, for example
393 the following command line limits the code coverage to routines in the
394 "demo" assembly:
395 .nf
396
397         mono --profile=cov:demo demo.exe
398
399 .fi
400 .PP
401 Notice that the 
402 .I assembly-name
403 does not include the extension.
404 .PP
405 You can further restrict the code coverage output by specifying a
406 namespace:
407 .nf
408
409         mono --profile=cov:demo/My.Utilities demo.exe
410
411 .fi
412 .PP
413 Which will only perform code coverage in the given assembly and
414 namespace.  
415 .PP
416 Typical output looks like this:
417 .nf
418
419         Not covered: Class:.ctor ()
420         Not covered: Class:A ()
421         Not covered: Driver:.ctor ()
422         Not covered: Driver:method ()
423         Partial coverage: Driver:Main ()
424                 offset 0x000a
425
426 .fi
427 .PP
428 The offsets displayed are IL offsets.
429 .SH DEBUGGING
430 It is possible to obtain a stack trace of all the active threads in
431 Mono by sending the QUIT signal to Mono, you can do this from the
432 command line, like this:
433 .nf
434         kill -QUIT pid
435 .fi
436 Where pid is the Process ID of the Mono process you want to examine.
437 The process will continue running afterwards.
438 .PP
439 You can use the MONO_LOG_LEVEL and MONO_LOG_MASK environment variables
440 to get verbose debugging output about the execution of your
441 application within Mono.
442 .PP
443 The 
444 .I MONO_LOG_LEVEL
445 environment variable if set, the logging level is changed to the set
446 value. Possible values are "error", "critical", "warning", "message",
447 "info", "debug". The default value is "error". Messages with a logging
448 level greater then or equal to the log level will be printed to
449 stdout/stderr.
450 .PP
451 Use "info" to track the dynamic loading of assemblies.
452 .PP
453 .PP
454 Use the 
455 .I MONO_LOG_MASK
456 environment variable to limit the extent of the messages you get: 
457 If set, the log mask is changed to the set value. Possible values are
458 "asm" (assembly loader), "type", "dll" (native library loader), "gc"
459 (garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
460 The default value is "all". Changing the mask value allows you to display only 
461 messages for a certain component. You can use multiple masks by comma 
462 separating them. For example to see config file messages and assembly loader
463 messages set you mask to "asm,cfg".
464 .PP
465 The following is a common use to track down problems with P/Invoke:
466 .nf
467
468         $ MONO_LOG_LEVEL="debug" MONO_LOG_MASK="dll" mono glue.exe
469
470 .fi
471 .PP
472 .SH SERIALIZATION
473 Mono's XML serialization engine by default will use a reflection-based
474 approach to serialize which might be slow for continous processing
475 (web service applications).  The serialization engine will determine
476 when a class must use a hand-tuned serializer based on a few
477 parameters and if needed it will produce a customized C# serializer
478 for your types at runtime.  This customized serializer then gets
479 dynamically loaded into your application.
480 .PP
481 You can control this with the MONO_XMLSERIALIZER_THS environment
482 variable.
483 .PP
484 The possible values are 
485 .B `no' 
486 to disable the use of a C# customized
487 serializer, or an integer that is the minimum number of uses before
488 the runtime will produce a custom serializer (0 will produce a
489 custom serializer on the first access, 50 will produce a serializer on
490 the 50th use). Mono will fallback to an interpreted serializer if the
491 serializer generation somehow fails. This behavior can be disabled
492 by setting the option
493 .B `nofallback'
494 (for example: MONO_XMLSERIALIZER_THS=0,nofallback).
495 .SH ENVIRONMENT VARIABLES
496 .TP
497 .I "GC_DONT_GC"
498 Turns off the garbage collection in Mono.  This should be only used
499 for debugging purposes
500 .TP
501 .I "MONO_AOT_CACHE"
502 If set, this variable will instruct Mono to ahead-of-time compile new
503 assemblies on demand and store the result into a cache in
504 ~/.mono/aot-cache. 
505 .TP
506 .I "MONO_CFG_DIR"
507 If set, this variable overrides the default system configuration directory
508 ($PREFIX/etc). It's used to locate machine.config file.
509 .TP
510 .I "MONO_CONFIG"
511 If set, this variable overrides the default runtime configuration file
512 ($PREFIX/etc/mono/config). The --config command line options overrides the
513 environment variable.
514 .TP
515 .I "MONO_DEBUG"
516 If set, enables some features of the runtime useful for debugging.
517 This variable should contain a comma separated list of debugging options.
518 Currently, the following options are supported:
519 .RS
520 .ne 8
521 .TP
522 .I "collect-pagefault-stats"
523 Collects information about pagefaults.   This is used internally to
524 track the number of page faults produced to load metadata.  To display
525 this information you must use this option with "--stats" command line option.
526 .TP
527 .I "handle-sigint"
528 Captures the interrupt signal (Control-C) and displays a stack trace
529 when pressed.  Useful to find out where the program is executing at a
530 given point.  This only displays the stack trace of a single thread. 
531 .TP
532 .I "keep-delegates"
533 This option will leak delegate trampolines that are no longer
534 referenced as to present the user with more information about a
535 delegate missuse.  Basically a delegate instance might be created,
536 passed to unmanaged code, and no references kept in managed code,
537 which will garbage collect the code.  With this option it is possible
538 to track down the source of the problems. 
539 .TP
540 .I "break-on-unverified"
541 If this variable is set, when the Mono VM runs into a verification
542 problem, instead of throwing an exception it will break into the
543 debugger.  This is useful when debugging verifier problems
544 .ne
545 .RE
546 .TP
547 .I "MONO_DISABLE_AIO"
548 If set, tells mono NOT to attempt using native asynchronous I/O services. In
549 that case, a default select/poll implementation is used. Currently only epoll()
550 is supported.
551 .TP
552 .I "MONO_DISABLE_MANAGED_COLLATION"
553 If this environment variable is `yes', the runtime uses unmanaged
554 collation (which actually means no culture-sensitive collation). It
555 internally disables managed collation functionality invoked via the
556 members of System.Globalization.CompareInfo class. Collation is
557 enabled by default.
558 .TP
559 .I "MONO_EGD_SOCKET"
560 For platforms that do not otherwise have a way of obtaining random bytes
561 this can be set to the name of a file system socket on which an egd or
562 prngd daemon is listening.
563 .TP
564 .I "MONO_EXTERNAL_ENCODINGS"
565 If set, contains a colon-separated list of text encodings to try when
566 turning externally-generated text (e.g. command-line arguments or
567 filenames) into Unicode.  The encoding names come from the list
568 provided by iconv, and the special case "default_locale" which refers
569 to the current locale's default encoding.
570 .IP
571 When reading externally-generated text strings UTF-8 is tried first,
572 and then this list is tried in order with the first successful
573 conversion ending the search.  When writing external text (e.g. new
574 filenames or arguments to new processes) the first item in this list
575 is used, or UTF-8 if the environment variable is not set.
576 .IP
577 The problem with using MONO_EXTERNAL_ENCODINGS to process your
578 files is that it results in a problem: although its possible to get
579 the right file name it is not necessarily possible to open the file.
580 In general if you have problems with encodings in your filenames you
581 should use the "convmv" program.
582 .TP
583 .I "MONO_GAC_PREFIX"
584 Provides a prefix the runtime uses to look for Global Assembly Caches.
585 Directories are separated by the platform path separator (colons on
586 unix). MONO_GAC_PREFIX should point to the top directory of a prefixed
587 install. Or to the directory provided in the gacutil /gacdir command. Example:
588 .B /home/username/.mono:/usr/local/mono/
589 .TP
590 .I "MONO_EVENTLOG_TYPE"
591 Sets the type of event log provider to use (for System.Diagnostics.EventLog).
592 .Sp
593 Possible values are:
594 .RS
595 .TP
596 .I "local[:path]"
597 .Sp
598 Persists event logs and entries to the local file system.
599 .Sp
600 The directory in which to persit the event logs, event sources and entries
601 can be specified as part of the value.
602 .Sp
603 If the path is not explicitly set, it defaults to "/var/lib/mono/eventlog"
604 on unix and "%APPDATA%\mono\eventlog" on Windows.
605 .TP
606 .I "win32"
607 .Sp
608 .B 
609 Uses the native win32 API to write events and registers event logs and
610 event sources in the registry.   This is only available on Windows. 
611 .Sp
612 On Unix, the directory permission for individual event log and event source
613 directories is set to 777 (with +t bit) allowing everyone to read and write
614 event log entries while only allowing entries to be deleted by the user(s)
615 that created them.
616 .TP
617 .I "null"
618 .Sp
619 Silently discards any events.
620 .ne
621 .PP
622 The default is "null" on Unix (and versions of Windows before NT), and 
623 "win32" on Windows NT (and higher).
624 .RE
625 .TP
626 .I "MONO_MANAGED_WATCHER"
627 If set to any value, System.IO.FileSystemWatcher will use the default
628 managed implementation (slow). If unset, mono will try to use FAM under
629 Unix systems and native API calls on Windows, falling back to the
630 managed implementation on error.
631 .TP
632 .I "MONO_PATH"
633 Provides a search path to the runtime where to look for library
634 files.   This is a tool convenient for debugging applications, but
635 should not be used by deployed applications as it breaks the assembly
636 loader in subtle ways. 
637 .Sp
638 Directories are separated by the platform path separator (colons on unix). Example:
639 .B /home/username/lib:/usr/local/mono/lib
640 .TP
641 .I "MONO_RTC"
642 Experimental RTC support in the statistical profiler: if the user has
643 the permission, more accurate statistics are gathered.  The MONO_RTC
644 value must be restricted to what the linux rtc allows: power of two
645 from 64 to 8192 Hz. To enable higher frequencies like 4096 Hz, run as root:
646 .nf
647
648         echo 4096 > /proc/sys/dev/rtc/max-user-freq
649
650 .fi
651 .Sp
652 For example:
653 .nf
654
655         MONO_RTC=4096 mono --profiler=default:stat program.exe
656
657 .fi
658 .TP
659 .I "MONO_NO_TLS"
660 Disable inlining of thread local accesses. Try setting this if you get a segfault
661 early on in the execution of mono.
662 .TP 
663 .I "MONO_SHARED_DIR"
664 If set its the directory where the ".wapi" handle state is stored.
665 This is the directory where the Windows I/O Emulation layer stores its
666 shared state data (files, events, mutexes, pipes).  By default Mono
667 will store the ".wapi" directory in the users's home directory.
668 .TP 
669 .I "MONO_SHARED_HOSTNAME"
670 Uses the string value of this variable as a replacement for the host name when
671 creating file names in the ".wapi" directory. This helps if the host name of
672 your machine is likely to be changed when a mono application is running or if
673 you have a .wapi directory shared among several different computers.
674 .Sp
675 Mono typically uses the hostname to create the files that are used to
676 share state across multiple Mono processes.  This is done to support
677 home directories that might be shared over the network.
678 .TP
679 .I "MONO_STRICT_IO_EMULATION"
680 If set, extra checks are made during IO operations.  Currently, this
681 includes only advisory locks around file writes.
682 .TP
683 .I "MONO_IO_PORTABILITY_HELP"
684 Enables some filename rewriting support to assist badly-written
685 applications that hard-code Windows paths.  Set to a colon-separated
686 list of "drive" to strip drive letters, or "case" to do
687 case-insensitive file matching in every directory in a path.  "all"
688 enables all rewriting methods.  (Backslashes are always mapped to
689 slashes if this variable is set to a valid option.)
690 .fi
691 .Sp
692 For example:
693 .nf
694
695         MONO_IO_PORTABILITY_HELP=drive:case
696
697 .TP
698 .I "MONO_THEME"
699 The name of the theme to be used by Windows.Forms.   Available themes today
700 include "clearlooks", "nice" and "win32".
701 .Sp
702 The default is "win32".  
703 .TP
704 .I "MONO_THREADS_PER_CPU"
705 The maximum number of threads in the general threadpool will be
706 20 + (MONO_THREADS_PER_CPU * number of CPUs). The default value for this
707 variable is 5.
708 .TP
709 .I "MONO_XMLSERIALIZER_THS"
710 Controls the threshold for the XmlSerializer to produce a custom
711 serializer for a given class instead of using the Reflection-based
712 interpreter.  The possible values are `no' to disable the use of a
713 custom serializer or a number to indicate when the XmlSerializer
714 should start serializing.   The default value is 50, which means that
715 the a custom serializer will be produced on the 50th use.
716 .TP
717 .I "MONO_XMLSERIALIZER_DEBUG"
718 Set this value to 1 to prevent the serializer from removing the
719 temporary files that are created for fast serialization;  This might
720 be useful when debugging.
721 .SH ENVIRONMENT VARIABLES FOR DEBUGGING
722 .TP
723 .I "MONO_ASPNET_NODELETE"
724 If set to any value, temporary source files generated by ASP.NET support
725 classes will not be removed. They will be kept in the user's temporary
726 directory.
727 .TP
728 .I "MONO_LOG_LEVEL"
729 The logging level, possible values are `error', `critical', `warning',
730 `message', `info' and `debug'.  See the DEBUGGING section for more
731 details.
732 .TP
733 .I "MONO_LOG_MASK"
734 Controls the domain of the Mono runtime that logging will apply to. 
735 If set, the log mask is changed to the set value. Possible values are
736 "asm" (assembly loader), "type", "dll" (native library loader), "gc"
737 (garbage collector), "cfg" (config file loader), "aot" (precompiler) and "all". 
738 The default value is "all". Changing the mask value allows you to display only 
739 messages for a certain component. You can use multiple masks by comma 
740 separating them. For example to see config file messages and assembly loader
741 messages set you mask to "asm,cfg".
742 .TP
743 .I "MONO_TRACE"
744 Used for runtime tracing of method calls. The format of the comma separated
745 trace options is:
746 .nf
747
748         [-]M:method name
749         [-]N:namespace
750         [-]T:class name
751         [-]all
752         [-]program
753         disabled                Trace output off upon start.
754
755 .fi
756 You can toggle trace output on/off sending a SIGUSR2 signal to the program.
757 .TP
758 .I "MONO_TRACE_LISTENER"
759 If set, enables the System.Diagnostics.DefaultTraceListener, which will 
760 print the output of the System.Diagnostics Trace and Debug classes.  
761 It can be set to a filename, and to Console.Out or Console.Error to display
762 output to standard output or standard error, respectively. If it's set to
763 Console.Out or Console.Error you can append an optional prefix that will
764 be used when writing messages like this: Console.Error:MyProgramName.
765 See the System.Diagnostics.DefaultTraceListener documentation for more
766 information.
767 .TP
768 .I "MONO_XEXCEPTIONS"
769 This throws an exception when a X11 error is encountered; by default a
770 message is displayed but execution continues
771 .TP
772 .I "MONO_XSYNC"
773 This is used in the System.Windows.Forms implementation when running
774 with the X11 backend.  This is used to debug problems in Windows.Forms
775 as it forces all of the commands send to X11 server to be done
776 synchronously.   The default mode of operation is asynchronous which
777 makes it hard to isolate the root of certain problems.
778 .SH FILES
779 On Unix assemblies are loaded from the installation lib directory.  If you set
780 `prefix' to /usr, the assemblies will be located in /usr/lib.  On
781 Windows, the assemblies are loaded from the directory where mono and
782 mint live.
783 .TP
784 .B ~/.mono/aot-cache
785 .Sp
786 The directory for the ahead-of-time compiler demand creation
787 assemblies are located. 
788 .TP
789 .B /etc/mono/config, ~/.mono/config
790 .Sp
791 Mono runtime configuration file.  See the mono-config(5) manual page
792 for more information.
793 .TP
794 .B ~/.config/.mono/certs, /usr/share/.mono/certs
795 .Sp
796 Contains Mono certificate stores for users / machine. See the certmgr(1) 
797 manual page for more information on managing certificate stores and
798 the mozroots(1) page for information on how to import the Mozilla root
799 certificates into the Mono certificate store. 
800 .TP
801 .B ~/.mono/assemblies/ASSEMBLY/ASSEMBLY.config
802 .Sp
803 Files in this directory allow a user to customize the configuration
804 for a given system assembly, the format is the one described in the
805 mono-config(5) page. 
806 .TP
807 .B ~/.config/.mono/keypairs, /usr/share/.mono/keypairs
808 .Sp
809 Contains Mono cryptographic keypairs for users / machine. They can be 
810 accessed by using a CspParameters object with DSACryptoServiceProvider
811 and RSACryptoServiceProvider classes.
812 .TP
813 .B ~/.config/.isolatedstorage, ~/.local/share/.isolatedstorage, /usr/share/.isolatedstorage
814 .Sp
815 Contains Mono isolated storage for non-roaming users, roaming users and 
816 local machine. Isolated storage can be accessed using the classes from 
817 the System.IO.IsolatedStorage namespace.
818 .TP
819 .B <assembly>.config
820 .Sp
821 Configuration information for individual assemblies is loaded by the
822 runtime from side-by-side files with the .config files, see the
823 http://www.mono-project.com/Config for more information.
824 .TP
825 .B Web.config, web.config
826 .Sp
827 ASP.NET applications are configured through these files, the
828 configuration is done on a per-directory basis.  For more information
829 on this subject see the http://www.mono-project.com/Config_system.web
830 page. 
831 .SH MAILING LISTS
832 Mailing lists are listed at the
833 http://www.mono-project.com/Mailing_Lists
834 .SH WEB SITE
835 http://www.mono-project.com
836 .SH SEE ALSO
837 .BR certmgr(1), mcs(1), mint(1), monodis(1), mono-config(5), mozroots(1), xsp(1).
838 .PP
839 For ASP.NET-related documentation, see the xsp(1) manual page