Skip to main content
filetrace doctor checks whether this machine can be monitored and how well. It checks the kernel, BTF, BPF and the capabilities needed to load programs, then loads every probe into the kernel, attaches it for the duration of the check and removes it again. It reports what the attached probes add up to, what a running agent has received and dropped, and ends with a status. It does not need a running agent.

Usage

Run it as root: loading BPF programs needs root, or CAP_BPF with CAP_PERFMON.

Reading the report

System checks

The first block names the platform, the kernel release and the architecture, then gives each check as AVAILABLE, LIMITED or MISSING, with a detail in parentheses where there is one:

PROBES

Every instrumentation point, loaded into the kernel and attached for the duration of the check, then removed. A probe is reported as attached only if the kernel accepted the program and every kernel field it reads was found. The probes that count network bytes are required: inet_sendmsg and inet_recvmsg in the trampoline set; tcp_sendmsg, tcp_cleanup_rbuf, inet_sock_destruct, ip_send_skb and skb_consume_udp in the kprobe set, which also requires the inet_sock_set_state tracepoint. The IPv6 and file probes are optional. Kernel functions are traced through BPF trampolines (fentry and fexit) where the kernel has them, and through kprobes otherwise. --probes checks one of the two sets. The kprobe set probes different functions and reads TCP byte counts from the sockets’ own counters:
That report ends with:
Kernel instrumentation describes what each probe records.

FEATURES

What the attached probes add up to, one line per feature, with the reason when a feature is not available in full: When every feature has the same status for the same reason, as when privileges are missing, the reason is stated once on a Reason: line. capabilities lists the same features for the running agent.

EVENT PIPELINE

What the running agent received and dropped. With an agent running, the section gives its PID and mode, the events received and dropped, and the sizes of the ring buffer and the event log. Otherwise it says that the agent is not running, or that it is running but its socket is not accessible to your user.

STATUS

A few lines of advice follow the status: which command to run next, or what the kernel needs. Without privileges, the BPF check is LIMITED with the detail not checked, every feature is reported as not verified, and the advice is to run sudo filetrace doctor.

Options

string
default:"auto"
Probe set to check: auto, trampoline or kprobe. auto tries BPF trampolines and falls back to kprobes.
string
default:"table"
table or json.
boolean
Short for --format json.

JSON output

status is ready, needs_privileges, unavailable or degraded. Each check and probe has a status of ok, warn or fail, and each feature one of FULL, PARTIAL, DISABLED or UNAVAILABLE. agent.state is running, stopped or unreachable; a running agent adds pid, mode, events_received, events_dropped, ring_buffer_bytes and event_log_bytes.

Examples

Troubleshooting explains what to do about each status other than READY.

Exit codes