linux下使用netstat和管道来获取服务端建立的ip连接数

来源:互联网 发布:oracle数据库查询语句 编辑:程序博客网 时间:2024/05/20 14:20

linux下使用netstat和管道来获取服务端建立的ip连接数,以ss服务端(已建立的TCP连接、python)为例:

netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp'


附anp说明:

-a     Show  both  listening  and  non-listening (for TCP this means established connections) sockets.

-n     Show numerical addresses instead of trying to determine symbolic host, port or user names.

-p     Show the PID and name of the program to which each socket belongs.

0 0
原创粉丝点击