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, Chapter syscall Provider, 2008, https://illumos.org/books/dtrace/chp-syscall.html. Brendan Gregg, Jim Mauro, DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD, Prentice Hall, Chapter Syscall Provider, pp. 315–327, 2011, https://www.brendangregg.com/dtracebook/.

AUTHORS
This manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>.