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
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).
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.
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.
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).
/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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With