Every network tool — ss, netstat, ip route, ifconfig — reads its data from /proc/net. This virtual directory exposes live kernel networking state as plain text files. Reading it directly skips the tools entirely and shows you exactly what the kernel sees.
cat /proc/net/sockstat
# sockets: used 512
# TCP: inuse 48 orphan 2 tw 12 alloc 62 mem 35
# UDP: inuse 8 mem 3
# UDPLITE: inuse 0
# RAW: inuse 0
# FRAG: inuse 0 memory 0
# Definitions:
# inuse = currently active sockets
# orphan = TCP sockets with no owning file descriptor (closed but not fully gone)
# tw = TIME_WAIT sockets (normal after connections close)
# alloc = allocated (including in kernel queues)
# mem = pages used for socket buffers
# High orphan count = application closing connections without reading data
# High tw count = normal under load, can tune with tcp_tw_reuse
cat /proc/net/arp
# IP address HW type Flags HW address Mask Device
# 192.168.1.1 0x1 0x2 aa:bb:cc:dd:ee:ff * eth0
# 192.168.1.100 0x1 0x2 11:22:33:44:55:66 * eth0
# Flags: 0x2 = complete (resolved), 0x6 = incomplete
# Or use: ip neigh show
# 192.168.1.1 dev eth0 lladdr aa:bb:cc:dd:ee:ff REACHABLE
# Flush ARP cache (force re-resolution):
ip neigh flush dev eth0
Frequently Asked Questions
What is /proc/net in Linux?
/proc/net is a virtual folder the Linux kernel exposes that shows live networking information as plain text files. There are no real files on disk — when you read them, the kernel reports current data like open connections, interface counters, and routing tables.
How do I see active network connections from /proc/net?
Read /proc/net/tcp and /proc/net/udp. Each line is one socket, with the local and remote addresses and port shown in hexadecimal plus a state code. Tools like netstat and ss simply parse these same files for you.
What does /proc/net/dev show?
/proc/net/dev lists every network interface with running counters for bytes and packets received and transmitted, plus errors and drops. Monitoring tools read this file repeatedly and compare the numbers to calculate live bandwidth.
Why read /proc/net instead of using netstat?
Reading /proc/net directly needs no extra packages, works on minimal containers, and shows exactly what the kernel sees. It is ideal for debugging on stripped-down systems where tools like netstat or ss are not installed.