truss.1 revision 31605
1.Dd Nov 23, 1997
2.Dt TRUSS 1
3.Os FreeBSD
4.Sh NAME
5.Nm \&truss
6.Nd trace system calls
7.Sh Synopsis
8.Nm \&truss
9.Op Fl S
10.Op Fl p Ar pid
11.Op Fl o Ar file
12command
13.Sh DESCRIPTION
14.Nm \&truss
15traces the system calls called by the specified process or program.
16Output is to the specified output file, or standard error by default.
17It does this by stopping and restarting the process being monitored via
18.Xr procfs 5 .
19.Pp
20The options are as follows:
21.Bl -tag -width command
22.It Fl S
23Do not display information about signals received by the process.
24(Normally,
25.Nm \&truss
26displays signal as well as system call events.)
27.It Fl p
28Follow the process specified by 
29.Ar pid
30instead of a new command.
31.It Fl o
32Print the output to the specified file instead of standard error.
33.It Ar command
34Execute
35.Ar command
36and trace the system calls of it.
37(The
38.Fl p
39and
40.Ar command
41options are mutually exclusive.)
42.Sh EXAMPLES
43# Follow the system calls used in echoing "hello"
44.Dl $ truss /bin/echo hello
45# Do the same, but put the output into a file
46.Dl $ truss -o /tmp/truss.out /bin/echo hello
47# Follow an already-running process
48.Dl $ truss -p 1
49.Sh SEE ALSO
50.Xr procfs 5 ,
51.Xr ktrace 1 ,
52.Xr kdump 1
53.Sh HISTORY
54The
55.Nm truss
56command was written by Sean Eric Fagan for FreeBSD; it was modeled after
57similar commands available for System V Release 4 and SunOS.
58