Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / truss / truss.1
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
18 command
19 .Op args
20 .Sh DESCRIPTION
21 The
22 .Nm
23 utility traces the system calls called by the specified process or program.
24 Output is to the specified output file, or standard error by default.
25 It does this by stopping and restarting the process being monitored via
26 .Xr procfs 5 .
27 .Pp
28 The options are as follows:
29 .Bl -tag -width indent
30 .It Fl S
31 Do not display information about signals received by the process.
32 (Normally,
33 .Nm
34 displays signal as well as system call events.)
35 .It Fl o Ar file
36 Print the output to the specified
37 .Ar file
38 instead of standard error.
39 .It Fl p Ar pid
40 Follow the process specified by
41 .Ar pid
42 instead of a new command.
43 .It Ar command Op args
44 Execute
45 .Ar command
46 and trace the system calls of it.
47 (The
48 .Fl p
49 and
50 .Ar command
51 options 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
65 The
66 .Nm
67 command was written by
68 .An Sean Eric Fagan
69 for
70 .Fx .
71 It was modeled after
72 similar commands available for System V Release 4 and SunOS.