AIX: Which Application is Using a Specific Port

How to check which application is binded to specific port on IBM AIX, maybe somebody will find it usefull.

Code:
# [color="Blue"]netstat -Aan | grep 5524[/color]
[U]f100060005e1eb98[/U] tcp4       0      0  *.5524             *.*                LISTEN

# [color="#0000ff"]rmsock f1000600060d8b98 tcpcb[/color]
The socket 0x60d8808 is being held by proccess [U]1982694[/U] (java.bin).

# [color="#0000ff"]ps ax | grep 1982694[/color]
 1003654  pts/6 A     0:00 grep 1982694 
 1982694  pts/3 A     3:03 /u00/orahome3/jdk/bin/java.bin -Dibm.stream.nio=true
 
  • Thanks
Reactions: l2f
Aix

Hello,

We run AIX at my office (another beast), this tip will help me and maybe impress my sysadmin (point of view from an application coder) ;)

l2f
 
You can also use lsof if it's installed. Most AIX admins install it.

Code:
# lsof -i:5524

# lslpp -w /usr/sbin/lsof
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/sbin/lsof                             lsof.base             File
 
Well since this is FreeBSD forum, why won't you add that on FreeBSD you can use
# sockstat -4 for IPv4 and # sockstat -6 for IPv6, or simply # sockstat to list all connections
 
Back
Top