标题:
代替netstat的查询工具ss
[打印本页]
作者:
linda
时间:
2017-3-23 17:15
标题:
代替netstat的查询工具ss
$ ss -t4 state established
Recv-Q Send-Q Local Address
ort Peer Address
ort
0 0 192.168.1.2:54436 165.193.246.23:https
$ ss -t4 state time-wait
Recv-Q Send-Q Local Address
ort Peer Address
ort
0 0 192.168.1.2:42261 199.59.150.39:https
$ ss -nt '( dst :443 or dst :80 )'
State Recv-Q Send-Q Local Address
ort Peer Address
ort
ESTAB 0 0 192.168.1.2:58844 199.59.148.82:443
# source address is 127.0.0.1 and source port is greater than 5000
$ ss -nt src 127.0.0.1 sport gt :5000
# local smtp (port 25) sockets
$ sudo ss -ntlp sport eq :smtp
# port numbers greater than 25
$ sudo ss -nt sport gt :1024
# sockets with remote ports less than 100
$ sudo ss -nt dport \< :100
# connections to remote port 80
$ sudo ss -nt state connected dport = :80
原文:
http://www.binarytides.com/linux-ss-command/
http://roclinux.cn/?p=2420
欢迎光临 中神通公司技术论坛 (http://trustcomputing.com.cn/bbs/)
Powered by Discuz! 6.0.0