Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

ProcDump-for-Linux

> 开发工具
Open source

A Linux version of the ProcDump Sysinternals tool

3.1K stars0 likes2 views
WebsiteGitHub

About

A Linux version of the ProcDump Sysinternals tool

ProcDump

ProcDump is a Linux and macOS reimagining of the classic ProcDump tool from the Sysinternals suite for Windows. It creates process dumps in response to performance, runtime, signal, and resource-tracking triggers.

The supported implementation is the Cargo workspace in this repository. Linux and macOS process access sit behind shared Rust interfaces. Linux native dumps use the Rust corex ELF writer by default; managed dumps use .NET diagnostics IPC; macOS and the explicit Linux -usegcore fallback use gcore.

The Linux eBPF kernel program and injected CLR profiler remain native components under crates/procdump/native/, built and embedded by Cargo. Their userspace loading, monitoring, EventPipe handling, orchestration, reporting, and dump writing are Rust.

Installation & Usage

Requirements

  • Rust stable with rustfmt and clippy
  • Linux: Clang, pkg-config, libelf/zlib development packages, gdb, and gcore
  • macOS: Xcode command-line tools, gdb, and gcore
  • .NET SDK/runtime when running managed integration scenarios

Install ProcDump

Please see installation instructions here.

Build

Please see build instructions here.

bash
cargo build --workspace
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Repository layout

  • crates/procdump: safe Rust API and shared dump/monitoring implementation
  • crates/procdump-cli: command-line application
  • crates/procdump-capi: static C ABI and public header
  • crates/procdump/native/ebpf: optional Linux eBPF kernel program
  • crates/procdump/native/profiler: optional injected CLR profiler
  • tests/integration: unchanged compatibility scenarios and native test fixtures
  • xtask: Cargo staging and integration-test runner

The procdump crate's default feature set supports immediate dump generation; monitoring, .NET triggers, and restrack are additive features, while the CLI enables full.

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.

…

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

The following will create a core dump immediately.

bash
sudo procdump 1234

The following will create 3 core dumps 10 seconds apart.

bash
sudo procdump -n 3 1234

The following will create 3 core dumps 5 seconds apart.

bash
sudo procdump -n 3 -s 5 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.

bash
sudo procdump -c 65 -n 3 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.

bash
sudo procdump -c 65 -n 3 -s 5 1234

The following will create a core dump when CPU usage is outside the range [10,65].

bash
sudo procdump -cl 10 -c 65 1234

The following will create a core dump when CPU usage is >= 65% or memory usage is >= 100 MB.

bash
sudo procdump -c 65 -m 100 1234

The following will create a core dump when memory usage is >= 100 MB followed by another dump when memory usage is >= 200MB.

bash
sudo procdump -m 100,200 1234

The following will create a memory leak report (no dumps) every time the user presses 't':

bash
sudo procdump -restrack 1234

The following will create 3 memory leak reports (no dumps) 5 seconds apart:

bash
sudo procdump -n 3 -s 5 -restrack nodump 1234

The following will create a core dump and a memory leak report when memory usage is >= 100 MB

bash
sudo procdump -m 100 -restrack 1234

The following will create a memory leak report (no dumps) when memory usage is >= 100 MB

bash
sudo procdump -m 100 -restrack nodump 1234

The following will create a core dump and a memory leak report when memory usage is >= 100 MB by sampling every 10th memory allocation.

bash
sudo procdump -m 100 -restrack -sr 10 1234

The following will create a core dump and a memory leak report when memory usage is >= 100 MB and exclude any call stacks that contain frames with the string "cache" in them

bash
sudo procdump -m 100 -restrack -fx *cache* 1234

The following will create a core dump when the total .NET memory usage is >= 100 MB followed by another dump when memory usage is >= 200MB.

bash
sudo procdump -gcm 100,200 1234

The following will create a core dump when .NET memory usage for generation 1 is >= 1 MB followed by another dump when memory usage is >= 2MB.

bash
sudo procdump -gcm 1:1,2 1234

The following will create a core dump when .NET Large Object Heap memory usage is >= 100 MB followed by another dump when memory usage is >= 200MB.

bash
sudo procdump -gcm LOH:100,200 1234

The following will create a core dump at the start and end of a .NET generation 1 garbage collection.

bash
sudo procdump -gcgen 1

The following will create a core dump in the /tmp directory immediately.

bash
sudo procdump 1234 /tmp

The following will create a core dump in the current directory with the name dump_0.1234. If -n is used, the files will be named dump_0.1234, dump_1.1234 and so on.

bash
sudo procdump 1234 dump

The following will create a core dump when a SIGSEGV occurs.

bash
sudo procdump -sig 11 1234

The following will create a core dump when a SIGSEGV occures where the core dump contains only anonymous private mappings.

bash
sudo procdump -mc 1 -sig 11 1234

The following will create a core dump when the target .NET application throws a System.InvalidOperationException

bash
sudo procdump -e -f System.InvalidOperationException 1234

The include filter supports partial and wildcard matching, so the following will create a core dump too for a System.InvalidOperationException

bash
sudo procdump -e -f InvalidOperation 1234

or

bash
sudo procdump -e -f "*Invali*Operation*" 1234

All options can also be used with -w, to wait for any process with the given name.

The following waits for a process named my_application and creates a core dump immediately when it is found.

bash
sudo procdump -w my_application

Current Limitations

  • Currently will only run on Linux Kernels version 3.5+ or macOS Sierra+.
  • Does not have full feature parity with the Windows version of ProcDump, specifically stay-alive functionality.

Feedback

  • Ask a question on StackOverflow (tag with ProcDumpForLinux)
  • Request a new feature on GitHub
  • Vote for popular feature requests
  • File a bug in GitHub Issues

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

  • How to build and run from source
  • The development workflow, including debugging and running tests
  • Coding Guidelines
  • Submitting pull requests

Please see also our Code of Conduct.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

ProcDump for Linux:

  • Clones, compiles and statically links against libbpf (https://github.com/libbpf/libbpf)
  • Copies symbol resolution source code from BCC (https://github.com/iovisor/bcc).
  • Uses eBPF

Issues· 22 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Cclidebugging-toolsysinternals

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具