]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - cddl/contrib/dtracetoolkit/Man/man1m/tcpsnoop.1m
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / cddl / contrib / dtracetoolkit / Man / man1m / tcpsnoop.1m
1 .TH tcpsnoop 1m  "$Date:: 2007-10-04 #$" "USER COMMANDS"
2 .SH NAME
3 tcpsnoop \- snoop TCP network packets by process. Uses DTrace.
4 .SH SYNOPSIS
5 .B tcpsnoop
6 [\-a|hjsvZ] [\-n name] [\-p pid]
7 .SH DESCRIPTION
8 This analyses TCP network packets and prints the responsible PID and UID,
9 plus standard details such as IP address and port. This captures traffic
10 of newly created TCP connections that were established while this program
11 was running. It can help identify which processes is causing TCP traffic.
12
13 Since this uses DTrace, only the root user or users with the
14 dtrace_kernel privilege can run this command.
15 .SH OS
16 Solaris 10 3/05
17 .SH STABILITY
18 unstable - this script uses fbt provider probes which may change for
19 future updates of the OS, invalidating this script. Please read
20 Docs/Notes/ALLfbt_notes.txt for further details about these fbt scripts.
21 .SH OPTIONS
22 .TP
23 \-a
24 print all data
25 .TP
26 \-j
27 print project ID
28 .TP
29 \-s
30 print time, us
31 .TP
32 \-v
33 print time, string
34 .TP
35 \-Z
36 print zone ID
37 .TP
38 \-n name
39 command name to snoop
40 .TP
41 \-p PID
42 process ID to snoop
43 .PP
44 .SH EXAMPLES
45 .TP
46 Default output, snoop TCP network packets with details,
47
48 .B tcpsnoop
49 .TP
50 Print human readable timestamps,
51 #
52 .B tcpsnoop
53 \-v
54 .TP
55 Print zonename,
56 #
57 .B tcpsnoop
58 \-Z
59 .TP
60 Print sshd traffic only,
61 #
62 .B tcpsnoop
63 \-n sshd
64 .PP
65 .SH FIELDS
66 .TP
67 UID
68 user ID
69 .TP
70 PID
71 process ID
72 .TP
73 CMD
74 command name
75 .TP
76 LADDR
77 local IP address
78 .TP
79 RADDR
80 remote IP address
81 .TP
82 LPORT
83 local port number
84 .TP
85 RPORT
86 remote port number
87 .TP
88 DR
89 direction
90 .TP
91 SIZE
92 packet size, bytes
93 .TP
94 TIME
95 timestamp, us
96 .TP
97 STRTIME
98 human readable timestamp, string
99 .TP
100 ZONE
101 zone ID
102 .TP
103 PROJ
104 project ID
105 .PP
106 .SH DOCUMENTATION
107 See the DTraceToolkit for further documentation under the 
108 Docs directory. The DTraceToolkit docs may include full worked
109 examples with verbose descriptions explaining the output.
110 .SH EXIT
111 tcpsnoop will print traffic until Ctrl\-C is hit.
112 .SH AUTHOR
113 Brendan Gregg
114 [Sydney, Australia]
115 .SH SEE ALSO
116 tcptop(1M), dtrace(1M)