Skip to content

goldshtn/minidumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minidumper

Minidumper is a command-line tool that can capture dump files of .NET processes in three modes: minimal, which is enough just for basic triage; heap, which includes managed heap information and other data required to diagnose more intricate .NET issues; and full, which creates a complete dump file.

What makes Minidumper interesting is the heap mode. For large applications, especially with a lot of modules or when unmanaged memory and code are involved, dumps generated by the heap mode can be 5x or 10x smaller than full memory dumps, but will still allow complete investigation of many .NET issues by tools like Visual Studio and WinDbg (SOS).

Head over to the releases section to download precompiled binaries if that's your thing.

DumpWriter

Also included is a stand-alone library (DumpWriter) that can be added to any project to capture dumps of arbitrary processes. The DumpWriter project also contains the full interop signatures for the Win32 MiniDumpWriteDump API and all associated data structures, including callback input and output structures.

NOTES

  • To create dumps of 32-bit processes, make sure to use the 32-bit version of the application -- and vice versa for 64-bit.
  • MiniDumper has gone through very minimal testing. Although it is unlikely that it will cause any damage to the target process (if dump generation fails, MiniDumper exits and the target continues running), but YMMV.
  • The --async option will not necessarily speed up dump generation if you are using a fast disk.

Usage

The command line options resemble those from procdump (not all features are yet implemented) so if you are familiar with that tool you should find yourself easily in minidumper.

  -m              Required. Create a dump file, second paramer:
    -mm
                  minidump enough to diagnose crashes and display call
                  stacks.
    -mh dump file with the CLR heap, but without
                  module code or unmanaged memory contents
    -ma complete
                  dump file with the full memory address space

  --async         Write dump chunks to disk asynchronously. Reduces process
                  suspension time at the expense of higher memory usage.

  -e              Write a dump when the process encounters an unhandled
                  exception. Include the 1 to create dump on first chance
                  exceptions, include the 2 to create dump on second chance
                  exceptions.

  -l              Display the debug logging of the process + diagnostics info
                  from the minidumper.

  --maxmem        Memory commit threshold in MB at which to create a dump.

  --minmem        Trigger when memory commit drops below specified MB value.

  -f              Filter on the content of exceptions and debug logging.
                  Wildcards (*) are supported.

  -x              Launch the specified image with optional arguments.

  -n              (Default: 1) Number of dumps to write before exiting.

  -t              Write a dump when the process terminates.

  -c              Start the process in a new console window.

  --help          Display this help screen.

  --version       Display version information.

  value pos. 0    Required. PID or process name

  value pos. 0    Arguments for the process to start

Articles about minidumper

About

Write minidumps of .NET processes with full memory, only CLR heaps, or no memory at all

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages