Enterprise Architecture & Integration, SOA, ESB, Web Services & Cloud Integration

Enterprise Architecture & Integration, SOA, ESB, Web Services & Cloud Integration

Friday 23 August 2013

How to identify process id for a server (for example, Oracle Service Bus) that is listening on port number, say 8090

Young WebLogic/JBoss application server administrators in my company have asked me one question on several occasions - "There are several Java processes running in the Unix server. How do I identify the process id of an application server (for example, Oracle Service Bus) listening on port number 8090". I thought this tip may be required by many others in other parts of the world and hence this post.

In Linux:
It is little straight forward to find out the process id by using the following command.


[portalmid@SVRCBS59 ~]$ netstat -anp | grep 8090
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 ::ffff:172.20.31.59:8090 :::* LISTEN 21962/java
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:39995 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:47691 ESTABLISHED 21962/java
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:42816 ESTABLISHED 21962/java
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:40047 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:48227 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:39825 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:52100 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:45243 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:44991 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:38068 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:33974 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:36778 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:55202 ESTABLISHED 21962/java
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:59590 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:57827 FIN_WAIT2 -
tcp 0 0 ::ffff:172.20.31.59:8090 ::ffff:172.20.31.60:43493 ESTABLISHED 21962/java
[portalmid@SVRCBS59 ~]$


Needless to explain, the process id is 21962.


In Solaris:
The above command does not work as such. I will write another post with example. Please wait for further update on this.

Thanks for reading my post and request you please to leave your comment here.

No comments:

Post a Comment