NmpCore Tool

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.

Moderator: SciTech Software

NmpCore Tool

Postby Harag » Tue Apr 10, 2018 9:04 am

Hi

I've found the "NmpCore" tool and downloaded it to have a play around with, given my recent problem (see other thread regarding .net missing file) I thought I would have a play with this, maybe putting this on a clients machine and using this to create .prfsession files - testing locally it seems to do the job.

Running NmpCore /? - I noticed it has a /i option to import a dmp file so I thought I would try this on the dmp file I have from the client to see what happens.

I've tried:

NmpCore /i "filename.dmp"
NmpCore /i "filename.dmp" /sf "MemoryDump.prfsession"

but I get the same result in the console:

.NET Memory Profiler NmpCore Tool - Version 5.6.27.0
Copyright (C) SciTech Software AB. All rights reserved
Extracting temporary profiler files
No process to profile has been specified.
Use /help (or /?) argument for information about command line usage.
Failed to delete temporary NmpCoreImpl.exe file

Any idea how I should import this .dmp file from the client with NmpCore (I'm guessing it saves the result out .prfsession)

I've also tried using the "/cp+" option, but no control panel appears.

Thanks.
Harag
 
Posts: 17
Joined: Thu Mar 22, 2018 11:22 am

Re: NmpCore Tool

Postby Andreas Suurkuusk » Tue Apr 10, 2018 1:46 pm

Instead of importing a memory dump using NmpCore, our intention is that you should use inspection only attach directly on the process you want to investigate. If you have a memory dump, then it is normally better to import it using the full memory profiler.

The /i argument is actually not officially documented and is not fully implemented in version 5.6, even though it is (mistakenly) listed in the /? help of NmpCore. In the next maintenance release we have included better support for the /i argument. You can now import memory dump files using NmpCore, but it will only look for the data access library in the same directory as the .NET runtime. In case of a version mismatch, the import will fail. We have not yet released this maintenance release officially, but you can download it using the link below.

https://cdn.memprofiler.com/download/v5 ... mpCore.exe

With this release, you should be able to import your memory dumps using:

NmpCore /i "filename.dmp"
NmpCore /i "filename.dmp" /sf "MemoryDump.prfsession"
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 993
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Re: NmpCore Tool

Postby Harag » Wed Apr 11, 2018 9:08 am

Hi
I have v5.6.29 from the memory profile install you gave me on the other thread. I found that it's actually in the install folder for the main application. :)

As you're aware from the other thread I was just trying to import the memory dump I was having issues with, but to no avail (due to silverlight)

My plan now is to use this tool on remote PCs to gather session information, then I can load it straight into MemProfiler. I have a feeling it will be better doing this rather than doing memory dumps via task manager - given the recent silverlight issue. :)

Is this the recommend way ?

Quick question on tool, when it saves the session. I've created a small batch file to run:

NmpCore /a %process% /cs1 /sf "Sessions\MemoryDump.prfsession"

I expected the session to be save in a subfolder "Sessions" from the location where the batch file is ran, however I found it saves in my user documents folder:

C:\Users\[username]\Documents\Sessions\MemoryDump.prfsession

I didn't want to put in the full path in the /sf line as I don't know what it might be on a remote PC, is there a way of making it save in a subfolder of the current folder ?


Thanks!
Harag
 
Posts: 17
Joined: Thu Mar 22, 2018 11:22 am

Re: NmpCore Tool

Postby Andreas Suurkuusk » Wed Apr 11, 2018 1:13 pm

Yes, I would recommend that you use NmpCore to attach to the process and create a session file, rather that creating memory dumps and import them.

If you only collect a single snapshot from the session, it might be a good idea to use "inspection-only" attach. This performs a non-invasive attach, i.e. the profiled process is not affected at all except for being briefly suspended. However, when you do an inspect-only attach, instances will not be tracked between snapshots and no garbage collections are performed before collecting the snapshot (which could cause additional instances to be included in the snapshot, e.g. instances with pending finalization). There's also a small risk that the snapshot is collected while instances are moved in memory, which will cause the snapshot collection to fail.

To perform an "inspection-only" attach, you can use the /ia argument, instead of the /a argument.

In the current version, the documents folder is used if the session file argument does not include a directory root. You are right, it would probably be better to save it in the current directory instead.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 993
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Re: NmpCore Tool

Postby Harag » Wed Apr 11, 2018 3:57 pm

Thanks for the above, much appreciated. I'll do some testing with the /ia vs /a
Harag
 
Posts: 17
Joined: Thu Mar 22, 2018 11:22 am


Return to Using .NET Memory Profiler

Who is online

Users browsing this forum: Bing [Bot] and 10 guests

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.


SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081

cron