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