1、首先根据端口号得到协议控制块
netstat -Aan | grep 389
f1000089c27a2358 tcp4 0 0 *.389 *.* LIST EN
-A Shows the address of any protocol control blocks associated with the sockets. This flag acts with the default display and is used for debugging purposes.
2、rmsock f100089c27a2358 tcpcb
The socket 0x702f6800 is being held by proccess 4986 (inetd) 得到PID为4986
3、得到进程名称:ps -ef | grep 4986
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/5359/viewspace-628744/
,如需转载,请注明出处,否则将追究法律责任。