ss是Socket Statistics的缩写。
netstat tips
1, netstat some of the commonly used options
netstat-s option to the various agreements were displayed according to their statistics.
netstat-e This option is used to display statistics on the Ethernet.
netstat-r This option displays information on the routing table.
netstat-a This option displays a list of all the valid connection information, including the connection has been established and the monitoring connection requests LISTENING ESTABLISHED connection.
netstat-n shows all connections established and effective
Show local listening TCP/UDP ports, and the process they belong to:
netstat -tulpn
它利用到了TCP协议栈中tcp_diag。tcp_diag是一个用于分析统计的模块,可以获得Linux 内核中第一手的信息,这就确保了ss的快捷高效。当然,如果你的系统中没有tcp_diag,ss也可以正常运行,只是效率会变得稍慢。(但仍然比 netstat要快。)
netstat命令是net-tools工具集中的一员
而ss命令是iproute工具集中的一员:
yum install iproute iproute-doc