dtrace_syscall(4)

dtrace_syscall4

A dtrace provider for system calls

Usage

syscall:abi:syscall:entry

syscall:abi:syscall:return

Overview

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();
}

Authors

This manual page was written by Mateusz Piotrowski ⟨[email protected]⟩.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.