Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_net.5

raw
1 .\" Copyright 1994-1995, Daniel Quinlan <[email protected]>
2 .\" Copyright 2002-2017, Michael Kerrisk <[email protected]>
3 .\" Copyright, Alan Cox <[email protected]>
4 .\" Copyright, the authors of the Linux man-pages project
5 .\"
6 .\" SPDX-License-Identifier: GPL-3.0-or-later
7 .\"
8 .TH proc_pid_net 5 2026-02-08 "Linux man-pages 6.18"
9 .SH NAME
10 /proc/pid/net/, /proc/net/ \- network layer information
11 .SH DESCRIPTION
12 .TP
13 .IR /proc/ pid /net/ " (since Linux 2.6.25)"
14 See the description of
15 .IR /proc/net .
16 .TP
17 .I /proc/net/
18 This directory contains various files and subdirectories containing
19 information about the networking layer.
20 The files contain ASCII structures and are,
21 therefore, readable with
22 .BR cat (1).
23 However, the standard
24 .BR netstat (8)
25 suite provides much cleaner access to these files.
26 .IP
27 With the advent of network namespaces,
28 various information relating to the network stack is virtualized (see
29 .BR network_namespaces (7)).
30 Thus, since Linux 2.6.25,
31 .\" commit e9720acd728a46cb40daa52c99a979f7c4ff195c
32 .I /proc/net
33 is a symbolic link to the directory
34 .IR /proc/self/net ,
35 which contains the same files and directories as listed below.
36 However, these files and directories now expose information
37 for the network namespace of which the process is a member.
38 .TP
39 .I /proc/net/arp
40 This holds an ASCII readable dump of the kernel ARP table used for
41 address resolutions.
42 It will show both dynamically learned and preprogrammed ARP entries.
43 The format is:
44 .IP
45 .in +4n
46 .EX
47 IP address HW type Flags HW address Mask Device
48 192.168.0.50 0x1 0x2 00:50:BF:25:68:F3 * eth0
49 192.168.0.250 0x1 0xc 00:00:00:00:00:00 * eth0
50 .EE
51 .in
52 .IP
53 Here "IP address" is the IPv4 address of the machine and the "HW type"
54 is the hardware type of the address from RFC\ 826.
55 The flags are the internal
56 flags of the ARP structure (as defined in
57 .IR /usr/include/linux/if_arp.h )
58 and
59 the "HW address" is the data link layer mapping for that IP address if
60 it is known.
61 .TP
62 .I /proc/net/dev
63 The dev pseudo-file contains network device status information.
64 This gives
65 the number of received and sent packets, the number of errors and
66 collisions
67 and other basic statistics.
68 These are used by the
69 .BR ifconfig (8)
70 program to report device status.
71 The format is:
72 .IP
73 .EX
74 Inter\-| Receive | Transmit
75 face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
76 lo: 2776770 11307 0 0 0 0 0 0 2776770 11307 0 0 0 0 0 0
77 eth0: 1215645 2751 0 0 0 0 0 0 1782404 4324 0 0 0 427 0 0
78 ppp0: 1622270 5552 1 0 0 0 0 0 354130 5669 0 0 0 0 0 0
79 tap0: 7714 81 0 0 0 0 0 0 7714 81 0 0 0 0 0 0
80 .EE
81 .\" .TP
82 .\" .I /proc/net/ipx
83 .\" No information.
84 .\" .TP
85 .\" .I /proc/net/ipx_route
86 .\" No information.
87 .TP
88 .I /proc/net/dev_mcast
89 Defined in
90 .IR /usr/src/linux/net/core/dev_mcast.c :
91 .IP
92 .in +4n
93 .EX
94 indx interface_name dmi_u dmi_g dmi_address
95 2 eth0 1 0 01005e000001
96 3 eth1 1 0 01005e000001
97 4 eth2 1 0 01005e000001
98 .EE
99 .in
100 .TP
101 .I /proc/net/igmp
102 Internet Group Management Protocol.
103 Defined in
104 .IR /usr/src/linux/net/core/igmp.c .
105 .TP
106 .I /proc/net/rarp
107 This file uses the same format as the
108 .I arp
109 file and contains the current reverse mapping database used to provide
110 .BR rarp (8)
111 reverse address lookup services.
112 If RARP is not configured into the
113 kernel,
114 this file will not be present.
115 .TP
116 .I /proc/net/raw
117 Holds a dump of the RAW socket table.
118 Much of the information is not of
119 use
120 apart from debugging.
121 The "sl" value is the kernel hash slot for the
122 socket,
123 the "local_address" is the local address and protocol number pair.
124 \&"St" is
125 the internal status of the socket.
126 The "tx_queue" and "rx_queue" are the
127 outgoing and incoming data queue in terms of kernel memory usage.
128 The "tr", "tm\->when", and "rexmits" fields are not used by RAW.
129 The "uid"
130 field holds the effective UID of the creator of the socket.
131 .\" .TP
132 .\" .I /proc/net/route
133 .\" No information, but looks similar to
134 .\" .BR route (8).
135 .TP
136 .I /proc/net/snmp
137 This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP
138 management
139 information bases for an SNMP agent.
140 .TP
141 .I /proc/net/tcp
142 Holds a dump of the TCP socket table.
143 Much of the information is not
144 of use apart from debugging.
145 The "sl" value is the kernel hash slot
146 for the socket, the "local_address" is the local address and port number pair.
147 The "rem_address" is the remote address and port number pair
148 (if connected).
149 \&"St" is the internal status of the socket.
150 The "tx_queue" and "rx_queue" are the
151 outgoing and incoming data queue in terms of kernel memory usage.
152 The "tr", "tm\->when", and "rexmits" fields hold internal information of
153 the kernel socket state and are useful only for debugging.
154 The "uid"
155 field holds the effective UID of the creator of the socket.
156 .TP
157 .I /proc/net/udp
158 Holds a dump of the UDP socket table.
159 Much of the information is not of
160 use apart from debugging.
161 The "sl" value is the kernel hash slot for the
162 socket, the "local_address" is the local address and port number pair.
163 The "rem_address" is the remote address and port number pair
164 (if connected).
165 "St" is the internal status of the socket.
166 The "tx_queue" and "rx_queue" are the outgoing and incoming data queue
167 in terms of kernel memory usage.
168 The "tr", "tm\->when", and "rexmits" fields
169 are not used by UDP.
170 The "uid"
171 field holds the effective UID of the creator of the socket.
172 The format is:
173 .IP
174 .EX
175 sl local_address rem_address st tx_queue rx_queue tr rexmits tm\->when uid
176 1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
177 1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
178 1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
179 .EE
180 .TP
181 .I /proc/net/unix
182 Lists the UNIX domain sockets present within the system and their
183 status.
184 The format is:
185 .IP
186 .EX
187 Num RefCount Protocol Flags Type St Inode Path
188 0: 00000002 00000000 00000000 0001 03 42
189 1: 00000001 00000000 00010000 0001 01 1948 /dev/printer
190 .EE
191 .IP
192 The fields are as follows:
193 .RS
194 .TP 10
195 .IR Num :
196 the kernel table slot number.
197 .TP
198 .IR RefCount :
199 the number of users of the socket.
200 .TP
201 .IR Protocol :
202 currently always 0.
203 .TP
204 .IR Flags :
205 the internal kernel flags holding the status of the socket.
206 .TP
207 .IR Type :
208 the socket type.
209 For
210 .B SOCK_STREAM
211 sockets, this is 0001;
212 for
213 .B SOCK_DGRAM
214 sockets, it is 0002;
215 and for
216 .B SOCK_SEQPACKET
217 sockets, it is 0005.
218 .TP
219 .IR St :
220 the internal state of the socket.
221 .TP
222 .IR Inode :
223 the inode number of the socket.
224 .TP
225 .IR Path :
226 the bound pathname (if any) of the socket.
227 Sockets in the abstract namespace are included in the list,
228 and are shown with a
229 .I Path
230 that commences with the character '@'.
231 .RE
232 .TP
233 .I /proc/net/netfilter/nfnetlink_queue
234 This file contains information about netfilter user-space queueing, if used.
235 Each line represents a queue.
236 Queues that have not been subscribed to
237 by user space are not shown.
238 .IP
239 .in +4n
240 .EX
241 1 4207 0 2 65535 0 0 0 1
242 (1) (2) (3)(4) (5) (6) (7) (8)
243 .EE
244 .in
245 .IP
246 The fields in each line are:
247 .RS 7
248 .TP 5
249 (1)
250 The ID of the queue.
251 This matches what is specified in the
252 .B \-\-queue\-num
253 or
254 .B \-\-queue\-balance
255 options to the
256 .BR iptables (8)
257 NFQUEUE target.
258 See
259 .BR iptables\-extensions (8)
260 for more information.
261 .TP
262 (2)
263 The netlink port ID subscribed to the queue.
264 .TP
265 (3)
266 The number of packets currently queued and waiting to be processed by
267 the application.
268 .TP
269 (4)
270 The copy mode of the queue.
271 It is either 1 (metadata only) or 2
272 (also copy payload data to user space).
273 .TP
274 (5)
275 Copy range;
276 that is,
277 how many bytes of packet payload should be copied to user space at most.
278 .TP
279 (6)
280 queue dropped.
281 Number of packets that had to be dropped by the kernel
282 because too many packets are already
283 waiting for user space to send back the mandatory accept/drop verdicts.
284 .TP
285 (7)
286 queue user dropped.
287 Number of packets that were dropped within the netlink subsystem.
288 Such drops usually happen when the corresponding socket buffer is full;
289 that is,
290 user space is not able to read messages fast enough.
291 .TP
292 (8)
293 sequence number.
294 Every queued packet is associated with
295 a (32-bit) monotonically increasing sequence number.
296 This shows the ID of the most recent packet queued.
297 .RE
298 .IP
299 The last number exists only for compatibility reasons and is always 1.
300 .SH SEE ALSO
301 .BR proc (5)