Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get network connections from /proc/net/sockstat

I founds this information in /proc which displays sockets:

$ cat /proc/net/sockstat 
sockets: used 8278
TCP: inuse 1090 orphan 2 tw 18 alloc 1380 mem 851
UDP: inuse 6574
RAW: inuse 1
FRAG: inuse 0 memory 0

Can you help me to find what these values means? Also are these values enough reliable or I need to search for it somewhere else?

Is these other way to find information about the TCP/UDP connections in Linux?

like image 665
Peter Penzov Avatar asked Oct 31 '22 10:10

Peter Penzov


1 Answers

In my understanding the /proc/net/sockstat is The most reliable place to look for that information. I often use it myself, and to have one single server to manage 1MM simultaneous connections that was the only place I could reliably count that information.

like image 119
Marcel Avatar answered Nov 16 '22 12:11

Marcel