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