DTRACE_SYSCALL(4) FreeBSD Kernel Interfaces Manual DTRACE_SYSCALL(4)
NAME
dtrace_syscall - a DTrace provider for system calls
SYNOPSIS
syscall:abi:syscall:entry
syscall:abi:syscall:return
DESCRIPTION
The syscall provider provides entry and return probes for system calls.
The module in the probe's description is abi, which indicates what system
call ABI a syscall belongs to. dtrace_syscall supports the following
system call ABIs:
freebsd Native ABI.
freebsd32 Non-native, 32-bit ABI.
linux Refer to linux(4).
linux32 Refer to linux(4).
The arguments to the entry probes are the arguments passed to the system
call.
The return probe stores the system call's return value in both arg0 and
arg1.
Inspect the d(7)'s errno variable to check if a system call failed.
EXAMPLES
Example 1: Count Up System Calls
The following script traces all system calls and counts them for every
process on the system.
syscall:::entry {
@[execname, pid] = count();
}
SEE ALSO
dtrace(1), intro(2), tracing(7)
The illumos Dynamic Tracing Guide,
https://illumos.org/books/dtrace/chp-syscall.html, 2008, Chapter syscall
Provider.
Brendan Gregg and Jim Mauro, DTrace: Dynamic Tracing in Oracle Solaris,
Mac OS X and FreeBSD, Prentice Hall,
https://www.brendangregg.com/dtracebook/, pp. 315-327, 2011, Chapter
Syscall Provider.
AUTHORS
This manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>.
FreeBSD 15.1-STABLE-HBSD May 7, 2026 DTRACE_SYSCALL(4)