freebsd-skq/usr.bin/truss/truss.1

70 lines
1.4 KiB
Groff
Raw Normal View History

.\" $FreeBSD$
.\"
.Dd November 23, 1997
1997-12-06 05:23:12 +00:00
.Dt TRUSS 1
.Os FreeBSD
.Sh NAME
.Nm truss
1997-12-06 05:23:12 +00:00
.Nd trace system calls
.Sh SYNOPSIS
.Nm
.Op Fl S
.Op Fl o Ar file
.Fl p Ar pid
.Nm
1997-12-06 05:23:12 +00:00
.Op Fl S
.Op Fl o Ar file
command
.Op args
1997-12-06 05:23:12 +00:00
.Sh DESCRIPTION
.Nm Truss
1997-12-06 05:23:12 +00:00
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 indent
1997-12-06 05:23:12 +00:00
.It Fl S
Do not display information about signals received by the process.
(Normally,
.Nm
1997-12-06 05:23:12 +00:00
displays signal as well as system call events.)
.It Fl o Ar file
Print the output to the specified
.Ar file
instead of standard error.
.It Fl p Ar pid
1997-12-06 05:23:12 +00:00
Follow the process specified by
.Ar pid
instead of a new command.
.It Ar command Op args
1997-12-06 05:23:12 +00:00
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 kdump 1 ,
1997-12-06 05:23:12 +00:00
.Xr ktrace 1 ,
.Xr procfs 5
1997-12-06 05:23:12 +00:00
.Sh HISTORY
The
.Nm
command was written by
.An Sean Eric Fagan
for
.Fx .
It was modeled after
1997-12-06 05:23:12 +00:00
similar commands available for System V Release 4 and SunOS.