8

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
user3631611
  • 81
  • 1
  • 1
  • 3

1 Answers1

8

/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

Community
  • 1
  • 1
k1eran
  • 4,492
  • 8
  • 50
  • 73
  • Thanks for the reply. What does the last column 'drop' indicate? – user3631611 May 20 '14 at 11:02
  • See http://stackoverflow.com/questions/22610003/what-are-the-reasons-for-udp-packets-to-be-dropped-by-the-network-stack ... dropped packets – k1eran May 20 '14 at 11:16
  • Just another query, I have packets being sent on port 514, however in /proc/net/udp I do not see an entry for the port in the file. How can I get the statistics appear for port 514? – user3631611 May 21 '14 at 11:18
  • No sign of local_address=00000000:202 in output ? Can u update question with current output ? – k1eran May 21 '14 at 13:12
  • 1
    00000000:202 does not show up in the output. – user3631611 May 21 '14 at 19:05
  • 1
    I do see an entry for socket with port 514 in /proc/net/udp6 instead of /proc/net/udp. But unfortunately the drop count remains 0, even though I have bombarded 50000 udp packets. – user3631611 May 22 '14 at 05:07