Open source
zcp, a latency auditor for Linux trading processes
Point it at a running process and it shows where that process waited: for a CPU, or for data from the network. Free, Apache-2.0, on GitHub.
What it does
zcp loads small eBPF programs into the Linux kernel and listens at three places: when a thread is woken (sched_wakeup), when the CPU switches threads (sched_switch), and when data is read from a TCP socket (tcp_recvmsg). It writes timestamps into a ring buffer and adds them up outside the kernel, so the process you’re measuring isn’t slowed the way a debugger or strace would slow it.
It reads timestamps, not your data, and it sends nothing anywhere: the report is a JSON file on your machine. That is what the project says of itself, and the source is there to check.
Install
On Linux, x86_64 or arm64:
curl -fsSL https://zerocopy.systems/zcp/install.sh | shThe script downloads the binary for your machine from the latest GitHub release and checks it against the release’s SHA-256 file before installing it. Each release also carries a signature for every binary. If you’d rather not pipe a script into a shell, download the binary and its .sha256 file from the release page and compare them yourself.
Run it
Tracing needs root, or the CAP_BPF and CAP_PERFMON capabilities:
sudo zcp audit --pid <PID> --jsonStop it with Ctrl-C and it writes its report. The README lists every option, including the ones that turn waiting time into an estimate of what it costs a desk.
A second pair of eyes
If you’d like us to read a report with you, email it to nikhil@zerocopy.systems. Issues and pull requests are welcome on GitHub.