Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/truss/truss.1
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd May 12, 2009 | .Dd October 5, 2015 | ||||
.Dt TRUSS 1 | .Dt TRUSS 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm truss | .Nm truss | ||||
.Nd trace system calls | .Nd trace system calls | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl facedDS | .Op Fl facedDS | ||||
.Op Fl o Ar file | .Op Fl o Ar file | ||||
.Op Fl s Ar strsize | .Op Fl s Ar strsize | ||||
.Fl p Ar pid | .Fl p Ar pid | ||||
.Nm | .Nm | ||||
.Op Fl facedDS | .Op Fl facedDS | ||||
.Op Fl o Ar file | .Op Fl o Ar file | ||||
.Op Fl s Ar strsize | .Op Fl s Ar strsize | ||||
.Ar command Op Ar args | .Ar command Op Ar args | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility traces the system calls called by the specified process or program. | utility traces the system calls called by the specified process or program. | ||||
Output is to the specified output file, or standard error by default. | Output is to the specified output file, or standard error by default. | ||||
jhb: utrace() is a system call, so I would just leave this language as-is. | |||||
It does this by stopping and restarting the process being monitored via | It does this by stopping and restarting the process being monitored via | ||||
.Xr ptrace 2 . | .Xr ptrace 2 . | ||||
.Pp | .Pp | ||||
The options are as follows: | The options are as follows: | ||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Fl f | .It Fl f | ||||
Trace descendants of the original traced process created by | Trace descendants of the original traced process created by | ||||
.Xr fork 2 , | .Xr fork 2 , | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
.Dl $ truss /bin/echo hello | .Dl $ truss /bin/echo hello | ||||
# Do the same, but put the output into a file | # Do the same, but put the output into a file | ||||
.Dl $ truss -o /tmp/truss.out /bin/echo hello | .Dl $ truss -o /tmp/truss.out /bin/echo hello | ||||
# Follow an already-running process | # Follow an already-running process | ||||
.Dl $ truss -p 34 | .Dl $ truss -p 34 | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr kdump 1 , | .Xr kdump 1 , | ||||
.Xr ktrace 1 , | .Xr ktrace 1 , | ||||
.Xr ptrace 2 | .Xr ptrace 2 , | ||||
.Xr utrace 2 | |||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
command was written by | command was written by | ||||
.An Sean Eric Fagan | .An Sean Eric Fagan | ||||
for | for | ||||
.Fx . | .Fx . | ||||
It was modeled after | It was modeled after | ||||
similar commands available for System V Release 4 and SunOS. | similar commands available for System V Release 4 and SunOS. |
utrace() is a system call, so I would just leave this language as-is.