查寻占用某个端口的程序名称
经常会碰到某个端口被其他程序占用却不知道具体的程序是什么。以下方法可以帮助你查个水落石出。比如我们要查出占用端口24628程序是什么,运行以下命令:
netstat -np -A inet
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:31619 127.0.0.1:6010 ESTABLISHED 12526/xterm
tcp 1568 0 127.0.0.1:31617 127.0.0.1:6010 ESTABLISHED 12523/qadinst
tcp 0 0 127.0.0.1:6010 127.0.0.1:45599 ESTABLISHED 6646/sshd: mfg@nott
tcp 0 0 167.3.204.24:51954 167.3.204.24:1521 ESTABLISHED 30679/emagent
tcp 0 0 167.3.204.24:46777 167.3.204.24:1521 ESTABLISHED 30679/emagent
tcp 0 0 167.3.204.24:24601 167.3.204.24:1521 ESTABLISHED 18547/ora_pmon_eeor
tcp 0 0 167.3.204.24:24628 167.3.204.24:1521 ESTABLISHED 30679/emagent
tcp 0 0 127.0.0.1:6010 127.0.0.1:31619 ESTABLISHED 6646/sshd: mfg@nott
tcp 0 0 127.0.0.1:6010 127.0.0.1:31617 ESTABLISHED 6646/sshd: mfg@nott
tcp 0 0 127.0.0.1:45599 127.0.0.1:6010 ESTABLISHED 6647/xterm