Command Line Arguments

There are two executable files that can be used to start .NET Memory Profiler from the command prompt: NetMemProfiler.exe and NetMemProfilerConsole.exe. Both of these are located in the installation directory of .NET Memory Profiler.

In addition to the .NET Memory Profiler application, the same arguments are available for the NmpCore tool, except the arguments /open and /noui. For information about arguments that are only available to NmpCore, see The NmpCore Tool.

By providing command line arguments to the executables, session files can be opened, or profiler settings can be modified and a new session started.

The command line should be written in the following form:

NetMemProfiler[Console].exe [options] [<process to profile>] [<arguments for the profiled process>]

The options are used to change the profiler settings, to specify a session file to open, and to specify the process to profile.

If no process to profile or session to open has been specified by the options, then the first non-option argument is used as a path to an executable to profile. For example, the command

NetMemProfiler.exe MemUser.exe

will start profiling the executable MemUser.exe using the standard settings (defined using the Settings form) .

To modify the settings, it is possible to provide additional arguments. For example

NetMemProfiler.exe /adt+ MemUser.exe

will start profiling the executable MemUser.exe with the AppDomain tracker (specified by the /adt+ option).

It is not allowed to specify conflicting options on the command line, e.g., /service (profile service) and /program (profile executable) cannot be used at the same time.

The options may be specified using either a slash, ‘/’, or single dash, ‘-.‘ It is not allowed to have extra spaces between a ‘/’ or ‘–‘ and the name of the option.

Some options take an additional value. The value can be a boolean, an integer, or a string.

Boolean values are specified using the symbol ‘0’ or ‘-‘ for false, and ‘1’ or ‘+’ for true. If no value is supplied, then the value is set to true.

Integer values and boolean values can be provided directly after the argument, or they can be separated by a ‘:’ or a space.

String values must be separated by a ‘:’ or a space.

NOTE! The settings that are modified by the command line options only affect the profiling session that is initialized by the command line arguments. If that session is stopped and another one is started, the settings from the standard profiler Settings form are used. Consequently, it is not allowed to specify options that modify settings without also specifying a process to profile.

.NET Memory Profiler User Manual

© Copyright 2002-2019. 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