
ProcDump-for-Linux v3.5.3
A Linux version of the ProcDump Sysinternals tool
ProcDump 
ProcDump is a Linux and Mac reimagining of the classic ProcDump tool from the Sysinternals suite of tools for Windows. ProcDump provides a convenient way for Linux and Mac developers to create core dumps of their application based on performance triggers. ProcDump for Linux and Mac is part of Sysinternals.

Installation & Usage
Requirements
- Minimum Linux OS:
- Red Hat Enterprise Linux / CentOS 7
- Fedora 29
- Ubuntu 16.04 LTS
gdb>= 7.6.1
- Minimum Mac OS: Sierra
Install ProcDump
Please see installation instructions here.
Build
Please see build instructions here.
Usage
BREAKING CHANGE With the release of ProcDump 1.3 the switches are now aligned with the Windows ProcDump version. Please note that the Mac version currently has a limited set of triggers.
Capture Usage:
procdump [-n Count]
[-s Seconds]
[-c|-cl CPU_Usage]
[-m|-ml Commit_Usage1[,Commit_Usage2...]]
[-gcm [<GCGeneration>: | LOH: | POH:]Memory_Usage1[,Memory_Usage2...]]
[-gcgen Generation]
[-restrack [nodump]]
[-sr Sample_Rate]
[-tc Thread_Threshold]
[-fc FileDescriptor_Threshold]
[-sig Signal_Number1[,Signal_Number2...]]
[-e]
[-f Include_Filter,...]
[-fx Exclude_Filter]
[-mc Custom_Dump_Mask]
[-pf Polling_Frequency]
[-o]
[-log syslog|stdout]
{
{{[-w] Process_Name | [-pgid] PID} [Dump_File | Dump_Folder]}
}
Options:
-n Number of dumps to write before exiting.
-s Consecutive seconds before dump is written (default is 10).
-c CPU threshold above which to create a dump of the process.
-cl CPU threshold below which to create a dump of the process.
-m Memory commit threshold(s) (MB) above which to create dumps.
-ml Memory commit threshold(s) (MB) below which to create dumps.
-gcm [.NET] GC memory threshold(s) (MB) above which to create dumps for the specified generation or heap (default is total .NET memory usage).
-gcgen [.NET] Create dump when the garbage collection of the specified generation starts and finishes.
-restrack Enable memory leak tracking (malloc family of APIs). If used without other triggers, use 't' to manually capture a restrack report. When used with other triggers, the 'nodump' option can be used to prevent dump generation and only produce restrack report(s).
-sr Sample rate when using -restrack.
-tc Thread count threshold above which to create a dump of the process.
-fc File descriptor count threshold above which to create a dump of the process.
-sig Comma separated list of signal number(s) during which any signal results in a dump of the process.
-e [.NET] Create dump when the process encounters an exception.
-f Filter (include) on the content of .NET exceptions (comma separated). Wildcards (*) are supported.
-fx Filter (exclude) on the content of -restrack call stacks. Wildcards (*) are supported.
-mc Custom core dump mask (in hex) indicating what memory should be included in the core dump. Please see 'man core' (/proc/[pid]/coredump_filter) for available options.
-pf Polling frequency.
-o Overwrite existing dump file.
-log Writes extended ProcDump tracing to the specified output stream (syslog or stdout).
-w Wait for the specified process to launch if it's not running.
-pgid Process ID specified refers to a process group ID.
Resource Tracking
The -restrack switch activates resource tracking, allowing for the monitoring and reporting of any resource allocations that have not been freed at the time of generating the core dump. The results are saved to a file with a '.restrack' extension. Currently, the following resource allocation/deallocation functions are tracked:
Allocation:
- malloc
- calloc
- realloc
- reallocarray
- mmap
Deallocation:
- free
- munmap
The Mac version does not currently implement resource tracking.
Examples
The following examples all target a process with pid == 1234