1bindsnoop(8) bindsnoop(8)
2
3
4
6 bindsnoop - Trace bind() system calls.
7
9 bindsnoop.py [-h] [-w] [-t] [-p PID] [-P PORT] [-E] [-U] [-u UID]
10 [--count] [--cgroupmap MAP] [--mntnsmap MNTNSMAP]
11
13 bindsnoop reports socket options set before the bind call that would
14 impact this system call behavior.
15
17 CONFIG_BPF and bcc.
18
20 Show help message and exit:
21
22 -h, --help
23
24 Include timestamp on output:
25
26 -t, --timestamp
27
28 Wider columns (fit IPv6):
29
30 -w, --wide
31
32 Trace this PID only:
33
34 -p PID, --pid PID
35
36 Comma-separated list of ports to trace:
37
38 -P PORT, --port PORT
39
40 Trace cgroups in this BPF map:
41
42 --cgroupmap MAP
43
44 Trace mount namespaces in this BPF map:
45
46 --mntnsmap MNTNSMAP
47
48 Include errors in the output:
49
50 -E, --errors
51
52 Include UID on output:
53
54 -U, --print-uid
55
56 Trace this UID only:
57
58 -u UID, --uid UID
59
60 Count binds per src ip and port:
61
62 --count
63
65 Trace all IPv4 and IPv6 bind()s
66
67 bindsnoop
68
69 Include timestamps
70
71 bindsnoop -t
72
73 Trace PID 181
74
75 bindsnoop -p 181
76
77 Trace port 80
78
79 bindsnoop -P 80
80
81 Trace port 80 and 81
82
83 bindsnoop -P 80,81
84
85 Include UID
86
87 bindsnoop -U
88
89 Trace UID 1000
90
91 bindsnoop -u 1000
92
93 Report bind errors
94
95 bindsnoop -E
96
97 Count bind per src ip
98
99 bindsnoop --count
100
101 Trace IPv4 and IPv6 bind system calls and report socket options that
102 would impact bind call behavior:
103
104 SOL_IP IP_FREEBIND F....
105
106 SOL_IP IP_TRANSPARENT .T...
107
108 SOL_IP IP_BIND_ADDRESS_NO_PORT ..N..
109
110 SOL_SOCKET SO_REUSEADDR ...R.
111
112 SOL_SOCKET SO_REUSEPORT ....r
113
114 SO_BINDTODEVICE interface is reported as "IF" index
115
117 This is from bcc.
118
119 https://github.com/iovisor/bcc
120
121 Also look in the bcc distribution for a companion _examples.txt file
122 containing example usage, output, and commentary for this tool.
123
125 Linux
126
128 Unstable - in development.
129
131 Pavel Dubovitsky
132
134 tcpaccept(8)
135
136
137
138 12 February 2020 bindsnoop(8)