Dtrace

From wikinotes
Revision as of 19:48, 13 September 2020 by Will (talk | contribs) (→‎Documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Watch/Count syscalls that a process makes.

Documentation

official docs http://dtrace.org/guide/preface.html#preface
one liners http://www.brendangregg.com/dtrace.html#OneLiners
examples http://www.brendangregg.com/dtrace.html#Examples

Install

FreeBSD

# dtrace is included in base system
pkg install dtrace-toolkit  # (optional) dtrace scripts

kldload dtraceall

MacOS

Usage

dtrace -l

cd /usr/local/share/dtrace-toolkit
./hotkernel            # watch syscalls of entire system
./procsystime -p $PID  # watch syscalls of specific process