netstat
netstat功能说明:显示网络状态。
语 法:netstat [-acCeFghilMnNoprstuvVwx][-A<网络类型>][--ip]
补充说明:利用netstat指令可让你得知整个Linux系统的网络情况。
参 数:
-a或--all 显示所有连线中的Socket。
-A<网络类型>或--<网络类型> 列出该网络类型连线中的相关地址。
-c或--continuous 持续列出网络状态。
-C或--cache 显示路由器配置的快取信息。
-e或--extend 显示网络其他相关信息。
-F或--fib 显示FIB。
-g或--groups 显示多重广播功能群组组员名单。
-h或--help 在线帮助。
-i或--interfaces 显示网络界面信息表单。
-l或--listening 显示监控中的服务器的Socket。
-M或--masquerade 显示伪装的网络连线。
-n或--numeric 直接使用IP地址,而不通过域名服务器。
-N或--netlink或--symbolic 显示网络硬件外围设备的符号连接名称。
-o或--timers 显示计时器。
-p或--programs 显示正在使用Socket的程序识别码和程序名称。
-r或--route 显示Routing Table。
-s或--statistice 显示网络工作信息统计表。
-t或--tcp 显示TCP传输协议的连线状况。
-u或--udp 显示UDP传输协议的连线状况。
-v或--verbose 显示指令执行过程。
-V或--version 显示版本信息。
-w或--raw 显示RAW传输协议的连线状况。
-x或--unix 此参数的效果和指定"-A unix"参数相同。
--ip或--inet 此参数的效果和指定"-A inet"参数相同。
netstat
netstat [options] [delay]
TCP/IP command. Show network status. Print information on active sockets, routing tables, interfaces, masquerade connections, or multicast memberships. By default, netstat lists open sockets. When a delay is specified, netstat will print new information every delay seconds.
Options
The first five options (-g, -i, -M, -r, and -s) determine what kind of information netstat should display.
Show multicast group memberships.
Show all network interfaces, or just the interface specified by name.
Show masqueraded connections.
Show kernel routing tables.
Show statistics for each protocol.
Show all entries.
Show connections only for the specified address family. Accepted values are inet, unix, ipx, ax25, netrom, and ddp. Specify multiple families in a comma-separated list.
Display information continuously, refreshing once every second.
Print routing information from the route cache.
Increase level of detail in reports. Use twice for maximum detail.
Print routing information from the forward information database (FIB). This is the default.
Show only listening sockets.
Show network addresses, ports, and users as numbers.
Show host addresses as numbers, but resolve others.
Show ports as numbers, but resolve others.
Show user ID numbers for users, but resolve others.
Where possible, print symbolic host, port, or usernames instead of numerical representations. This is the default behavior.
Include information on network timers.
Show the process ID and name of the program owning the socket.
Limit report to information on TCP sockets.
Limit report to information on UDP sockets.
Verbose mode.
Limit report to information on raw sockets.