How to install ProcDump in Linux
ProcDump is a Linux reimagining of the classic ProcDump tool from the Sysinternals Suite of tools for Windows. ProcDump provides a convenient way for Linux developers to create core dumps of their applications based on performance triggers.
Requirement:
- Minimum OS:
- Red Hat Enterprise Linux / CentOS 7
- Fedora 26
- Ubuntu 14.04 LTS
gdb
>= 7.6.1zlib
(build-time only)
Install
Via .deb Package
wget https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod/pool/main/p/procdump/procdump_1.0.1_amd64.deb
sudo dpkg -i procdump_1.0.1_amd64.deb
sudo apt-get -f install
Use
Example
The following will create a core dump immediately.
sudo procdump -p 1234
The following will create 3 core dumps 10 seconds apart.
sudo procdump -n 3 -p 1234
The following will create 3 core dumps 5 seconds apart.
sudo procdump -n 3 -s 5 -p 1234
The following will create a core dump each time the process has CPU usage >= 65%, up to 3 times, with at least 10 seconds between each dump.
sudo procdump -C 65 -n 3 -p 1234
The following will create a core dump each time the process has CPU usage >= 65%, up to 3 times, with at least 5 seconds between each dump.
sudo procdump -C 65 -n 3 -s 5 -p 1234
The following will create a core dump when CPU usage is outside the range [10,65].
sudo procdump -c 10 -C 65 -p 1234
The following will create a core dump when CPU usage is >= 65% or memory usage is >= 100 MB.
sudo procdump -C 65 -M 100 -p 1234