Code snippets from the Paged Out #2 article.
Required GDB and basic shell tools.
Just load the DTrace module:
kldload dtraceall.ko
For systems with apt:
sudo apt install bpfcc-tools linux-headers-$(uname -r)
For other Linux distro please refer INSTALL.md.
You have to set TRACE_BIN
environment variable to point to the binary you want to trace.
dtrace -s script.d -p PROCESS\_PID
or
dtrace -s script.d -c BINARY
python script.py BINARY PROCESS\_PID
Disconnect3d for review of the article.
BSD