见下面的输出:
tcp 0 0 192.168.2.222:35774 192.168.3.200:9090 TIME_WAIT
在Linux上我想知道哪个程序连接到192.168.3.200:9090,我该如何实现?
答案 0 :(得分:0)
你可以netstat -anp
您需要sudo
或成为root用户才能查看流程信息。
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 665/sshd
答案 1 :(得分:0)
netstat -avnp | egrep '^tcp' | fgrep '192.168.3.200:9090'
答案 2 :(得分:0)
我认为
# lsof -Pnl +M -i4 // Listens on all IPV4 Ports
或
# netstat -ntp
是您要搜索的命令。
然后尝试使用fgrep查找该行。 (在你的情况下:fgrep'192.168.3.200:9090')
- > netstat -ntp | fgrep '192.168.3.200:9090'