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