AIX
1:首先根据端口号
netstat -Aan | grep 389
f1000089c27a2358 tcp4 0 0 *.389 *.* LIST EN
2:rmsock f100089c27a2358 tcpcb
如果是tcp连接,则rmsock
如果是udp连接,则rmsock
The socket 0x702f6800 is being held by proccess 4986 (inetd).
得到id为4986
3:ps -ef |grep 4986
Windows
netstat -an –o
Solaris
查看22端口现在运行的情况
# lsof –i | grep 22
Linux
netstat -anp