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