TRUSS(1) | MidnightBSD General Commands Manual | TRUSS(1) |
truss
— trace
system calls
truss |
[-facedDHS ] [-o
file] [-s
strsize] -p
pid |
truss |
[-facedDHS ] [-o
file] [-s
strsize] command
[args] |
The truss
utility traces the system calls
called by the specified process or program. Output is to the specified
output file, or standard error by default. It does this by stopping and
restarting the process being monitored via
ptrace(2).
The options are as follows:
-f
-a
-c
-e
-d
-D
-H
-S
truss
displays signal as well as system
call events.)-o
file-s
strsize...
” will be
displayed at the end of the string. The default
strsize is 32.-p
pid-p
and command options
are mutually exclusive.)Follow the system calls used in echoing "hello":
$ truss /bin/echo hello
Do the same, but put the output into a file:
$ truss -o /tmp/truss.out /bin/echo
hello
Follow an already-running process:
$ truss -p 34
The truss
command was written by
Sean Eric Fagan for FreeBSD.
It was modeled after similar commands available for System V Release 4 and
SunOS.
July 24, 2017 | midnightbsd-3.1 |