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