Monday, 26 January 2015

Tools for creating and analysing .NET application memory dumps

Creating Memory Dumps

  • Download procdump from http://technet.microsoft.com/en-gb/sysinternals/dd996900.aspx
  • Extract contents of the Zip file and you will find an executable called ‘procdump.exe’
  • Find the process ID of the process from which you want to take the memory dump
    • This can be done by opening windows task manager; for example from the screenshot below we want to create a memory dump of the w3wp process which has 4224 as the process ID
      https://capacitas.files.wordpress.com/2013/04/task-manager.jpg
     
  • Open a command prompt window and navigate to the directory where you extracted procdump and type the following command:
    • procdump –ma ProcessID MemoryDumpName
      • Example: procdump –ma 4224 w3wpmemorydump
    • If the capture of the memory dump was successful, you should see a file called w3wpmemorydump.dmp created in the folder where you have the procdump executable
      https://capacitas.files.wordpress.com/2013/04/image2.jpg

    Analysing Memory Dumps

     debug diagnostic tool
    • Navigate to the folder where you have memory dump saved and open it.  It will then add it in the Data Files list.
    • There are different types of analysis that can now be performed on this memory dump.  For example: Crash/Hang Analysis, Memory Pressure Analyzers, etc..
    • As an example we will try to analyse the DotNetMemory, select the 2nd line from the analysis scripts window and click on ‘Start Analysis’
    • After a few seconds a new tab will appear in your internet browser that will look like the screenshots below.  You can browse through the page to view memory contents, objects stored in memory and various other metrics that will help in troubleshooting performance issues.
    CLR Information

1 comment:

  1. titanium nose hoop - vitacels.com
    Use a titanium rings helmet on the chin of the helmet race tech titanium to improve the overall stability of the titanium armor helmet. This includes the two pieces of titanium that we titanium glasses frames use in the titanium flask construction of

    ReplyDelete