Available Command Line Options

The following list presents all the options that can be provided on the command line. Most options have a long form and a short form. Both forms can be used, but the long form may be more suitable in response files and the short for more suitable on the command line. For more information about the settings that can be changed using these options, see Session Settings.

 

Argument

Short form

Description

/attach <pid>

/attach <process name>

/a

Attach to a running process using the profiling API. Specify the process using process id or process name, e.g. /a 1234, or /a SomeProcess.exe. Requires that the process runs under .NET Framework 4.0 and has concurrent GC disabled. For more information, see Attach to Process using Profiling API.

/dbgattach <pid>

/dbgattach <process name>

/da

Attach to a running process using the Debugging Tools for Windows. Specify the process using process id or process name, e.g. /a 1234, or /a SomeProcess.exe. Requires that Debugging Tools for Windows are installed on the machine.

/appdomaintracker[+/-]

/adt

Boolean option. Indicates whether AppDomain tracking should be enabled.

/asp

/asp

This option enables ASP.NET profiling. May not be used with /program or /service.

/autocollect <interval>

/ac

Integer option. Enables automatic snapshot collection and sets the collection time interval (in minutes).

/collectrealtime[+/-]

/cr

Boolean option. Enables or disables the real-time data collection. May not be used with /delaycleanup.

/collectandstop <count>

/cs

Integer option (optional). Collects the specified number of snapshots and then stops the profiler. The snapshot collection interval is specified using the /autocollect argument. If the /autocollect argument is not included, the default collection interval of 10 minutes is used.

/peaksnapshot[+/-]

/ps

Boolean option. Enables or disables peak snapshot collection.

/disableinlining[+/-]

/di

Boolean option. Enables or disables inlining of methods. May not be used with /nativeprofiling.

/disposetracker[+/-]

/dt

Boolean option. Enables or disables the dispose tracker. May not be used with /nativeprofiling.

/heaputil[+/-]

/hu

Boolean option. Enables or disables the heap utilization tracker.

/includeinstancedata[+/-]

/iid

Boolean option. Indicates whether instance data should be included in the auto-saved heap snapshots.

/maxgraphmemory <kbytes>

/mg

Integer option. Only used if collecting real-time data. It defines the maximum amount of memory (in kilobytes) to use for real-time data for classes included in the real-time graph.

/maxnographmemory <kbytes>

/mng

Integer option. Only used if collecting real-time data. It defines the maximum amount of memory (in kilobytes) to use for real-time data for classes not included in the real-time graph.

/maxsnapshots <count>

/ms

Integer option. Defines the maximum number of software triggered heap snapshots.

/memleakcollect[+/-]

/mlc

Boolean option. Indicates whether a full heap snapshot should be collected when a memory leak is detected.

/memleakprompt[+/-]

/mlp

Boolean option. Indicates whether the user should be prompted for an action when a memory leak is detected.

/memleakstartui[+/-]

/mlui

Boolean option. Indicates whether the user interface should be started when a memory leak is detected.

/memleakstopsession[+/-]

/mlss

Boolean option. Indicates whether the profiling session should be stopped when a memory leak is detected.

/memleaksuspend[+/-]

/mlsu

Boolean option. Indicates whether the profiled process should be suspended while a detected memory leak is being handled.

/noui

/noui

Runs the profiler in non-interactive mode. If this option is used, a process to profile must also be specified.

/open <file path>

/open

String option. Opens the previously saved session file specified by the option value. This option may not be used with any other options.

/passthrough[+/-]

/pt

Boolean option. If true, then the exit code of the profiled process will be returned from the profiler instead of the standard exit code.

/program <file path>

/p

String option. The option value specifies the path of a program to profile. This option must be the last option, since subsequent arguments are used as arguments for the profiled program. This option is the default option, so it is possible to specify the program to profile by simply providing the path to the program without the parameter name (/program or /p). May not be used with /service or /asp.

/project <file path>

/prj

String option. The option value specifies the path of a profiler project. The settings of the project are used to start profiling a new session. If a process to profile is specified using /program, /service or /asp this will override the launch settings in the profiler project.

/resourcetracker[+/-]

/rt

Boolean option. Indicates whether the unmanaged resources tracker should be enabled.

/rootidentification[+/-]

/ri

Boolean option. Enables or disables root identification. May not be used with /nativeprofiling.

/saveproject[+/-]

/sprj

Boolean option. Indicates whether the project specified by /project should be automatically saved if a session has been added to it. The default setting is to save the project; to avoid saving provide the argument “/saveproject–“.  This option only affects the profiler when running in non-interactive mode.

/service <service name>

/svc

String option. The option value specifies the name of a service to profile. May not be used together with /program or /asp.

/sessionfile <file path>

/sf

String option. The option value defines the name of the file to which auto-saved session files should be saved. The file name can include the strings %DATE% and %TIME%. These strings will be replaced with the current date and time when the session is saved.

/sessionfolder <folder path>

/sfl

String option. The option value defines the folder in which auto-saved session files should be saved. It is recommended that this argument is avoided, instead use /sessionfile to specify the full path of the session file

/sessionprompt[+/-]

/sp

Boolean option. Indicates whether the user should be prompted for an action when a session is ended.

/shadowsymbols[+/-]

 

Boolean  option, Indicates whether a shadow copy should be made of the symbol files. To be enable to recompile an assembly while profiling (e.g. when running unit tests), this option must be enabled. Note, this option affects all sessions started by the profiler, not just the one started first.

/snapshotselect[+/-]

/ss

Boolean option. Indicates whether the user should be allowed to select which snapshots to include when saving the profiling session.

.NET Memory Profiler User Manual

© Copyright 2002-2015. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB