# AIX: Which Application is Using a Specific Port



## vermaden (Apr 10, 2009)

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


```
# [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
```


----------



## l2f (Jun 10, 2011)

*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


----------



## Blueprint (Jun 10, 2011)

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


```
# lsof -i:5524

# lslpp -w /usr/sbin/lsof
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/sbin/lsof                             lsof.base             File
```


----------



## graudeejs (Jun 10, 2011)

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


----------

