]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Man/man1m/shellsnoop.1m
MFC r368207,368607:
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Man / man1m / shellsnoop.1m
1 .TH shellsnoop 1m  "$Date:: 2007-08-05 #$" "USER COMMANDS"
2 .SH NAME
3 shellsnoop \- snoop live shell activity. Uses DTrace.
4 .SH SYNOPSIS
5 .B shellsnoop
6 [\-hqsv] [\-p PID] [\-u UID]
7 .SH DESCRIPTION
8 A program to print read/write details from shells,
9 such as keystrokes and command outputs.
10
11 This program sounds somewhat dangerous (snooping keystrokes), but is
12 no more so than /usr/bin/truss, and both need root or dtrace privileges to
13 run. In fact, less dangerous, as we only print visible text (not password
14 text, for example). Having said that, it goes without saying that this
15 program shouldn't be used for breeching privacy of other users.
16
17 This was written as a tool to demonstrate the capabilities of DTrace.
18
19 Since this uses DTrace, only the root user or users with the
20 dtrace_kernel privilege can run this command.
21 .SH OS
22 Solaris
23 .SH STABILITY
24 stable - this script uses the syscall provider.
25 .SH OPTIONS
26 .TP
27 \-q
28 quiet, only print data
29 .TP
30 \-s
31 include start time, us
32 .TP
33 \-v
34 include start time, string
35 .TP
36 \-p PID
37 PID to snoop
38 .TP
39 \-u UID
40 user ID to snoop
41 .PP
42 .SH EXAMPLES
43 .TP
44 Default output,
45
46 .B shellsnoop
47 .TP
48 human readable timestamps,
49
50 .B shellsnoop
51 \-v
52 .TP
53 watch this PID only,
54 #
55 .B shellsnoop
56 \-p 1892
57 .TP
58 watch this PID data only,
59 #
60 .B shellsnoop
61 \-qp 1892
62 .PP
63 .SH FIELDS
64 .TP
65 UID
66 user ID
67 .TP
68 PID
69 process ID
70 .TP
71 PPID
72 parent process ID
73 .TP
74 COMM
75 command name
76 .TP
77 DIR
78 direction (R read, W write)
79 .TP
80 TEXT
81 text contained in the read/write
82 .TP
83 TIME
84 timestamp for the command, us
85 .TP
86 STRTIME
87 timestamp for the command, string
88 .PP
89 .SH DOCUMENTATION
90 See the DTraceToolkit for further documentation under the 
91 Docs directory. The DTraceToolkit docs may include full worked
92 examples with verbose descriptions explaining the output.
93 .SH EXIT
94 shellsnoop will run forever until Ctrl\-C is hit.
95 .SH AUTHOR
96 Brendan Gregg
97 [Sydney, Australia]
98 .SH SEE ALSO
99 dtrace(1M)