netstat -anp |grep pid进程号 这个命令可以通过进程pid号来查看对应的监听的端口号
root@zabbixclient:~/python# netstat -anp |grep 53298
tcp6 0 0 :::3306 ::: LISTEN 53298/mysqld
unix 2 [ ACC ] STREAM LISTENING 1682646 53298/mysqld /var/run/mysqld/mysqld.sock
root@zabbixclient:~/python# netstat -nap | grep 62097
tcp 0 0 0.0.0.0:88 0.0.0.0: LISTEN 62097/python
unix 3 [ ] STREAM CONNECTED 1698082 62097/python
unix 3 [ ] STREAM CONNECTED 1718174 62097/python
xiaoxianglan@beyondcent.com
原文地址:http://blog.51cto.com/dreamgirl1314/2351468
时间: 2024-10-13 10:26:58