mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
58 lines
1.3 KiB
Groff
58 lines
1.3 KiB
Groff
.Dd Nov 23, 1997
|
|
.Dt TRUSS 1
|
|
.Os FreeBSD
|
|
.Sh NAME
|
|
.Nm \&truss
|
|
.Nd trace system calls
|
|
.Sh Synopsis
|
|
.Nm \&truss
|
|
.Op Fl S
|
|
.Op Fl p Ar pid
|
|
.Op Fl o Ar file
|
|
command
|
|
.Sh DESCRIPTION
|
|
.Nm \&truss
|
|
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
|
|
.Xr procfs 5 .
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width command
|
|
.It Fl S
|
|
Do not display information about signals received by the process.
|
|
(Normally,
|
|
.Nm \&truss
|
|
displays signal as well as system call events.)
|
|
.It Fl p
|
|
Follow the process specified by
|
|
.Ar pid
|
|
instead of a new command.
|
|
.It Fl o
|
|
Print the output to the specified file instead of standard error.
|
|
.It Ar command
|
|
Execute
|
|
.Ar command
|
|
and trace the system calls of it.
|
|
(The
|
|
.Fl p
|
|
and
|
|
.Ar command
|
|
options are mutually exclusive.)
|
|
.Sh EXAMPLES
|
|
# Follow the system calls used in echoing "hello"
|
|
.Dl $ truss /bin/echo hello
|
|
# Do the same, but put the output into a file
|
|
.Dl $ truss -o /tmp/truss.out /bin/echo hello
|
|
# Follow an already-running process
|
|
.Dl $ truss -p 1
|
|
.Sh SEE ALSO
|
|
.Xr procfs 5 ,
|
|
.Xr ktrace 1 ,
|
|
.Xr kdump 1
|
|
.Sh HISTORY
|
|
The
|
|
.Nm truss
|
|
command was written by Sean Eric Fagan for FreeBSD; it was modeled after
|
|
similar commands available for System V Release 4 and SunOS.
|