Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of fields in /proc/net/udp [closed]

Tags:

linux

udp

I would like to understand what each of the fields in /proc/net/udp and /proc/net/snmp mean:

# cat /proc/net/udp
 sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode ref pointer drops
  4: 00000000:006F 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 10777 2 ffff88023bbd3a80 0
110: 00000000:4959 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 10975 2 ffff88023bbd30c0 0
122: 00000000:0265 00000000:0000 07 00000000:00000000 00:00000000 00000000     0        0 10781 2 ffff88023bbd3400 0

# cat /proc/net/snmp
Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors
Udp: 768010194 3069028933 1052487950 17032 68916498 0
like image 713
user3631611 Avatar asked May 20 '14 07:05

user3631611


People also ask

What is Proc net UDP?

Holds a dump of the UDP socket table. Much of the information is not of use apart from debugging. The "sl" value is the kernel hash slot for the socket, the "local_address" is the local address and port number pair. The "rem_address" is the remote address and port number pair (if connected).

Why do UDP packets get dropped?

The UDP packet loss is especially affected by TCP traffic and its flow control mechanism. This is because TCP flow control continues to increase its window size until packet loss occurs if the advertised window size is large enough.

How do I read a TCP file in Proc net?

Use /proc/<pid>/fd - this lists all the open file descriptors, including sockets that the process is using. e.g. You can then find the corresponding entry (e.g. 640754628) from /proc/<pid>/net/tcp -> inode[6] to get all the details of the socket - e.g.

How is UDP packet loss measured?

Confirm that a UDP packet drop is occurring If you see the number growing, the NIC is dropping packets. Another command to check the packet loss data of the NIC is ifconfig , which will output statistics of RX (receive incoming packets) and TX (transmit outgoing packets).


1 Answers

/proc/net/udp

Holds a dump of the UDP socket table. Much of the information is not of use apart from debugging. The "sl" value is the kernel hash slot for the socket, the "local_address" is the local address and port number pair. The "rem_address" is the remote address and port number pair (if connected). "St" is the internal status of the socket. The "tx_queue" and "rx_queue" are the outgoing and incoming data queue in terms of kernel memory usage. The "tr", "tm->when", and "rexmits" fields are not used by UDP. The "uid" field holds the effective UID of the creator of the socket.

Also see https://stackoverflow.com/a/18322579/449347

/proc/net/snmp

This file holds the ASCII data needed for the IP, ICMP, TCP, and UDP management information bases for an SNMP agent.

From http://linux.die.net/man/5/proc

like image 191
k1eran Avatar answered Oct 22 '22 19:10

k1eran