truss(1) on Solnix vs Linux and the BSDs
On Solnix, truss is the illumos truss at /usr/bin/truss. Like Linux strace and FreeBSD truss it prints decoded system calls to standard error, but it also traces signals, machine faults and user-level function calls. Its single-letter flags differ from both: -s selects signals, not string length, and -p takes a list of pids as arguments.
The manual pages
- Solnix: truss(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: strace(1) strace-7.2 (different command, similar job)
- Linux: ltrace(1) ltrace-0.7.91 (different command, similar job)
- FreeBSD: truss(1) 15.1-RELEASE
- FreeBSD: ktrace(1) 15.1-RELEASE (different command, similar job)
- OpenBSD: ktrace(1) 8.0 (different command, similar job)
- NetBSD: ktrace(1) 11.0 (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos truss at /usr/bin/truss. No other variants are shipped. Linux strace and ltrace are not part of the bundle's Solnix text. OpenBSD and NetBSD have no truss in the bundle; their counterpart is ktrace(1) with kdump(1), plus ktruss on NetBSD.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | -s meaning | Solnix truss -s takes a comma-separated signal list to trace or exclude (default -sall). FreeBSD truss -s takes strsize, the maximum characters of a string shown (default 32). The Solnix text shown has no string-length option.Source: Solnix truss(1) -s; FreeBSD truss(1) -s strsize |
| FreeBSD | -S meaning | Solnix truss -S names signals that stop the process, leaving it stopped and abandoned (default -S!all). FreeBSD truss -S hides signal events. A FreeBSD script using -S to cut noise would stop traced processes on Solnix.Source: Solnix truss(1) -S; FreeBSD truss(1) -S |
| Linux | -S, -u and -E meaning | On Solnix, -S is a stop-on-signal list, -u a user-level library:function list, and -E a time-in-syscall column. The strace synopsis uses -S sortby, -u username and -E var[=val] (set an environment variable).Source: Solnix truss(1) -S, -u, -E; Linux strace(1) SYNOPSIS (-S sortby, -u username, -E var[=val]) |
| Linux | selecting system calls | Solnix selects system calls with -t [!]syscall,... (default -tall), and signals, faults and file descriptors with -s, -m and -r/-w. The strace synopsis uses a single -e expr for filtering.Source: Solnix truss(1) SYNOPSIS, -t, -s, -m, -r; Linux strace(1) SYNOPSIS (-e expr) |
| Linux, FreeBSD | -p syntax | On Solnix, -p is a flag with no argument: the remaining arguments are pids, optionally pid/thread-id (for example /1,2,7-9) or /proc/12345. strace and FreeBSD truss write -p pid, and FreeBSD truss accepts one pid.Source: Solnix truss(1) -p; Linux strace(1) SYNOPSIS (-p pid); FreeBSD truss(1) -p pid |
| FreeBSD | thread and timestamp flags | Solnix -l prints the LWP id on each line. FreeBSD truss uses -H for the thread ID. Solnix also has -E, the time spent inside each system call. FreeBSD truss has no equivalent. -d and -D exist on both.Source: Solnix truss(1) -l, -d, -D, -E; FreeBSD truss(1) -H, -d, -D |
| Linux, FreeBSD | stopping a process, faults and user functions | Solnix -T, -S and -M leave the traced process stopped and abandoned for a debugger, and -m traces machine faults (default -mall -m !fltpage). Solnix -u traces user-level function calls. The FreeBSD truss page has no such options.Source: Solnix truss(1) -T, -M, -m, -u; FreeBSD truss(1) SYNOPSIS |
| Linux | library call tracing | For library-call tracing Linux uses ltrace: -l library_pattern, -e filter, and prototype libraries described in ltrace.conf(5). On Solnix this is truss -u lib,...:func,... inside truss itself, with nesting shown by indentation.Source: Solnix truss(1) SYNOPSIS, DESCRIPTION; Linux ltrace(1) DESCRIPTION, -l, -e |
| FreeBSD, OpenBSD, NetBSD | trace file versus live output | Solnix truss prints the trace live, to standard error or -o outfile. FreeBSD, OpenBSD and NetBSD ktrace write binary records to ktrace.out (or -f trfile), to be decoded with kdump(1). NetBSD ktruss prints decoded output to standard output.Source: Solnix truss(1) -o; FreeBSD/OpenBSD/NetBSD ktrace(1) DESCRIPTION; NetBSD ktrace(1) ktruss |
| FreeBSD | how tracing attaches | FreeBSD truss stops and restarts the process via ptrace(2). Solnix truss takes control through /proc: -p works only if uid and gid match or the user is privileged, and processes can be named as /proc/pid.Source: FreeBSD truss(1) DESCRIPTION; Solnix truss(1) -p |
| FreeBSD, OpenBSD, NetBSD | tracing current versus future children | Solnix truss -f follows children created by fork() or vfork() and prefixes lines with the process id. ktrace on all three BSDs splits this into -d (current children) and -i (future children). FreeBSD truss -f matches Solnix.Source: Solnix truss(1) -f; FreeBSD/OpenBSD/NetBSD ktrace(1) -d, -i; FreeBSD truss(1) -f |
| Linux | error and sleeping-call output | Solnix reports errors with error code names, adds a privilege name in [ ] if the kernel reports a missing privilege, and re-reports calls asleep over one second unless -i is given. strace appends the errno symbol and error string and marks calls unfinished/resumed.Source: Solnix truss(1) DESCRIPTION, -i; Linux strace(1) DESCRIPTION |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| trace a command's system calls | truss command | strace command | truss command [args] | ktrace command, then kdump | ktruss command |
| attach to a running process | truss -p pid | strace -p pid | truss -p pid | ktrace -p pid | ktrace -p pid |
| follow child processes | truss -f | strace --follow-forks | truss -f | ktrace -i (future children), -d (current) | ktrace -i (future children), -d (current) |
| summary of call counts | truss -c | strace -c | truss -c | — | — |
| send trace to a file | truss -o outfile | strace -o file | truss -o file | ktrace -f trfile | ktruss -o outfile |
| decode a saved trace | — | — | kdump(1) | kdump(1) | kdump(1) or ktruss -f infile |
| trace library calls | truss -u lib:func | ltrace | — | — | — |
| turn off tracing on all your processes | — | — | ktrace -C | ktrace -C | ktrace -C |
Standards
- POSIX: truss is not a POSIX.1-2024 utility.
- FreeBSD: The truss HISTORY section says it was written by Sean Eric Fagan for FreeBSD, modeled after similar commands available for System V Release 4 and SunOS.
Writing portable scripts
- Do not share single-letter truss flags between systems:
-sand-Smean signals on Solnix but string length and hide-signals on FreeBSD, and-ptakes its pid differently. Choose the tool (truss, strace, ktrace) first, then build the flags. - Use
-ooutfile /-ofile where it exists, and ktrace-fon OpenBSD, so trace output does not mix with the program's standard error.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.