参考:20 Netstat Commands for Linux Network Management
Foreword
Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
Options
-a:Show both listening and non-listening (for TCP this means established connections) sockets
-at:列出Active Internet connections (servers and established)
-au:列出Active Internet connections (servers and established)
-ax:列出Unix domain sockets
-l:Show only listening sockets.
-lt:列出Active Internet connections (only servers)
-lu:列出Active Internet connections (only servers)
-lx:列出Unix domain sockets
-s:Display summary statistics for each protocol.
-p:Show the PID and name of the program to which each socket belongs.
-c #:This will cause netstat to print the selected information every # seconds continuously.
-r:Display the kernel routing tables
-I=iface , -i:Display a table of all network interfaces, or the specified iface.
-ie:similar to ifconfig