Wednesday, November 9, 2011

AIX: Checking which process is bound to which TCP/UDP port number

Had no idea what so ever at all on how to do this at first, Linux has a very convenient way of doing this. Say if you want to find out which process is bound to port 8080.

# netstat -Aan | grep 8080
f1000200031b6b98 tcp4       0      0  *.8080             *.*                LISTEN

# rmsock f1000200031b6b98 tcpcb
The socket 0x31b6808 is being held by proccess 1306834 (httpd).

No comments: