成长值: 15613
2444
2544
7万
管理员
ss,它是 iproute2 包附带的另一个工具,允许你查询 socket 的有关统计信息。可以完成 netstat 同样的任务,但是,ss 稍微快一点而且命令更简短。 -- Mathieu Trudel-lapierre
编译自: https://insights.ubuntu.com/2017/07/25/ss-another-way-to-get-socket-statistics/ 作者: Mathieu Trudel-lapierre 译者: Vic020
$ ss -t State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 127.0.0.1:postgresql 127.0.0.1:48154 ESTAB 0 0 192.168.0.136:35296 192.168.0.120:8009 ESTAB 0 0 192.168.0.136:47574 173.194.74.189:https […]
$ ss state all sport = :ssh Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port tcp LISTEN 0 128 *:ssh *:* tcp ESTAB 0 0 192.168.0.136:ssh 192.168.0.102:46540 tcp LISTEN 0 128 :::ssh :::*
$ ss state connected sport = :ssh Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port tcp ESTAB 0 0 192.168.0.136:ssh 192.168.0.102:46540
$ ss state all dst 74.125.0.0/16 Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port tcp ESTAB 0 0 192.168.0.136:33616 74.125.142.189:https tcp ESTAB 0 0 192.168.0.136:42034 74.125.70.189:https tcp ESTAB 0 0 192.168.0.136:57408 74.125.202.189:https
您需要 登录 才可以下载或查看,没有帐号?立即注册
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|51学通信技术论坛
GMT+8, 2025-1-31 18:57 , Processed in 0.130905 second(s), 33 queries .
Powered by Discuz! X3
© 2001-2013 Comsenz Inc.