What is the unit of "mem" and "memory" in /proc/net/sockstat
What is the unit of mem and memory in /proc/net/sockstat? Bytes, KBytes, Pages?
[kbrandt@ny-kbrandt01: ~] cat /proc/net/sockstat
sockets: used 153
TCP: inuse 7 orphan 0 tw 0 alloc 8 mem 1
UDP: inuse 4 mem 3
UDPLITE: inuse 0
RAW: inuse 0
FRAG: inuse 0 memory 0
Solution 1:
There seems to be no documentation of this besides the kernel source itself, and I presume you don't want to dig quite that deep.
After digging through several pages of search results I finally found one forum post from someone who apparently did read the kernel source, which claims that the mem
values for TCP and UDP are in kernel pages, while the memory
value in FRAG is in bytes.
I glanced at the corresponding sources myself, and this seems to be true. Though, I am no kernel expert and frequently get lost in that maze...