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