TRACING(7)

πŸ“¦ version 15.1, in freebsd 15.1, nixpkgs unstable

NAME ✨

okay bestie, you opened TRACING(7) β€” the page from the Miscellaneous Information Manual that's literally your intro to FreeBSD tracing and performance monitoring. slay.


DESCRIPTION πŸ¦‹

FreeBSD has a whole large variety of tracing and performance monitoring facilities, no cap. Use them to measure performance and troubleshoot kernel and userland problems β€” both during development(7) and potentially on production systems. They differ in scope, ease of use, overhead, design, and limitations. vibe check: different tools for different jobs.

DTrace πŸ’…

dtrace(1) is the most versatile tracing framework available on FreeBSD, and it's capable of tracing throughout the whole FreeBSD software stack β€” from the kernel all the way to applications running in userland. For more details, refer to dtrace(1) and SDT(9). iconic behavior.

dwatch(1) is a user-friendly wrapper for DTrace. It simplifies common DTrace usage patterns and requires less expert knowledge to operate. bestie-friendly DTrace! 🫢

Userland Tracing πŸŽ€

truss(1) traces system calls. It uses sysdecode(3) to pretty-print system call arguments and ptrace(2) to trace processes.

ktrace(1) is useful for debugging user programs. It enables kernel trace logging for specified processes. Like truss(1), it mainly traces system calls, but instead of using ptrace(2), it asynchronously logs entries to a trace file configured with ktrace(2) β€” typically ktrace.out β€” and it can log other types of kernel events, such as page faults and name lookups (refer to -t in ktrace(1)). Also, programs can log to a ktrace(1) stream using the utrace(2) system call. so many logs, so little time 😭

Kernel Tracing πŸ”₯

ktr(4) is a facility for logging strings in the kernel. It comes in handy for some niche purposes during kernel development. It lets kernel programmers log events to a global ring buffer, which can later be dumped using ktrdump(8). kernel-dev main character energy.

Hardware-Accelerated Tracing ⭐

hwt(4) is a kernel trace framework providing infrastructure for hardware-assisted tracing.

Hardware Counters πŸ“

pmcstat(8), and its kernel counterpart, hwpmc(4), is the FreeBSD facility for conducting performance measurements with hardware counters. numbers go brrr.

Boot-Time And Shutdown Tracing 🌸

boottrace(4) is a facility for tracing events at boot and shutdown. Its target audience is system administrators. sysadmin besties, this one's for you.

tslog(4) is a developer-oriented tool for tracing boot-time events.


HISTORY πŸ’–

The tracing manual page was written by Mateusz Piotrowski <0mp@FreeBSD.org>. It first appeared in FreeBSD 15.0.


cute little sign-off: this page's footer is giving Debian, dated July 12, 2025, and the title is TRACING(7). byeee, go trace something iconic πŸ’…βœ¨
πŸ“¦ where this page comes from