AIX根据占用的端口号查看进程号

  • 首先使用 nestat -Ant | grep 端口号 获得该端口号的PCB(Protocol control block),组查看协议tcp。(输出信息中第一列既是PCB)
  • 如果是tcp连接,那么用 rmsock tcpcb
  • 如果是udp连接,那么用 rmsock inpcb

例:

# netstat -Ant | grep 8000
f1000e000288c3b8 tcp4 0 0 127.0.0.1.8000 *.* LISTEN
# rmsock f1000e000288c3b8 tcpcb
The socket 0xf1000e000288c008 is being held by proccess 10551550 (abc).

你可能感兴趣的:(AIX根据占用的端口号查看进程号)