Command Line Examples

Use the command line below to:

1.   Attach to a process named SomeProcess.exe

2.   Collect a single snapshot and stop profiling,

3.   Save the session as C:\Sessions\DumpSession.prfsession.

NmpCore /a SomeProcess.exe /cs1 /sf "C:\Sessions\DumpSession.prfsession"

 The response file corresponding to the command line above:

# Attach to process with the name SomeProcess.exe (short form /a)

/attach SomeProcess.exe

 

# Collect a single snapshot and stop profiler (short form /cs)

/collectandstop

 

# Save session as DumpSession.prfsession (short form /sf)

/sessionfile c:\Sessions\DumpSession.prfsession

Another possibility is to collect a few snapshots in the same session file. Use the command line below to:

      Attach to a process named SomeProcess.exe

      Collect three snapshots with a 5 minute delay between the snapshots and then stop profiling.

      Save the session as C:\Sessions\DumpSession.prfsession.

NmpCore /a SomeProcess.exe /cs3 /ac5 /sf "C:\Sessions\DumpSession.prfsession"

 

A similar command line can also be used even when starting the program from Nmpore. Note that the /p argument must come last.

NmpCore /cs3 /ac5 /sf "C:\Sessions\DumpSession.prfsession" /p <path>\SomeProcess.exe