Page 1 of 1

NmpCore usage questions

Posted: Wed Mar 04, 2015 5:22 pm
by kevinv

I'm trying to collect snapshots with NmpCore. I'm using the below command line.

NmpCore.exe /r /svc "Service Name" /cs1 /ac5 /rt /hu /iid /dt /sf "C:\Temp\DumpSession.prfsession"

I'm assuming this will take one snapshot after 5 minutes and exit, and save the snapshot to the DumpSession.prfsession file. Very little of this is working. It doesn't do anything after 5 minutes. I have to click the Collect snapshot button to take a snapshot. I then click the Stop profiling button and it asks me to save the session. I thought the /sf option would do that for me. So is something wrong or am I not understanding what the options do?

Also what are the NmpCore options necessary to get the same behavior as the High profiling level setting in the UI? I think I have most of them with the /rt /hu /iid and /dt options. Am I missing any?

Also in looking at a snaphost ran with the above, I'm not seeing the unmanaged memory usage as I do in the UI. Isn't that what the /rt option is supposed to do?


Re: NmpCore usage questions

Posted: Thu Mar 05, 2015 1:36 pm
by Andreas Suurkuusk
The argument that specifies what process to profile must be last the one on the command line (in your case the /svc argument). The profiler will ignore any arguments after this, and pass them to the profiled program (when applicable).

So you should use this command line instead:

Code: Select all

NmpCore.exe /r /cs1 /ac5 /rt /hu /iid /dt /sf "C:\Temp\DumpSession.prfsession" /svc "Service Name"
The /hu and /dt options will give you the same behavior as the high profiling level. The /rt and /iid options are not part of the profiling level settings. Currently, there are also options that you currently cannot change using command line arguments, such as the instance tracking level, but the default matches the high profiling level setting.