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.

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 withTopicWhat differs
FreeBSD-s meaningSolnix 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 meaningSolnix 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 meaningOn 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])
Linuxselecting system callsSolnix 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 syntaxOn 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
FreeBSDthread and timestamp flagsSolnix -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, FreeBSDstopping a process, faults and user functionsSolnix -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
Linuxlibrary call tracingFor 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, NetBSDtrace file versus live outputSolnix 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
FreeBSDhow tracing attachesFreeBSD 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, NetBSDtracing current versus future childrenSolnix 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
Linuxerror and sleeping-call outputSolnix 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

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
trace a command's system callstruss commandstrace commandtruss command [args]ktrace command, then kdumpktruss command
attach to a running processtruss -p pidstrace -p pidtruss -p pidktrace -p pidktrace -p pid
follow child processestruss -fstrace --follow-forkstruss -fktrace -i (future children), -d (current)ktrace -i (future children), -d (current)
summary of call countstruss -cstrace -ctruss -c——
send trace to a filetruss -o outfilestrace -o filetruss -o filektrace -f trfilektruss -o outfile
decode a saved trace——kdump(1)kdump(1)kdump(1) or ktruss -f infile
trace library callstruss -u lib:funcltrace———
turn off tracing on all your processes——ktrace -Cktrace -Cktrace -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: -s and -S mean signals on Solnix but string length and hide-signals on FreeBSD, and -p takes its pid differently. Choose the tool (truss, strace, ktrace) first, then build the flags.
  • Use -o outfile / -o file where it exists, and ktrace -f on 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.