Linux下查看進程占用端口:
查看程序對應進程號:ps –ef|grep 進程名
REDHAT :查看進程號所占用的端口號:netstat –nltp|grep 進程號<?xml:namespace prefix="o">?xml:namespace>
ubuntu:查看進程占用端口號:netstat -anp|grep pid
Linux下查看端口號所使用的進程號:
使用lsof命令: lsof –i:端口號
[root@xcloud230 ~]# netstat -tlpanu|grep collectd
tcp 57327 0 172.18.1.230:58353 172.18.1.217:14242 ESTABLISHED 1320/collectd
udp 0 0 0.0.0.0:17631 0.0.0.0:* 1320/collectd