How To See Which Process Has Taken What Port In HPUX

Today the question has arisen as to see, in HPUX, that processes are using certain ports. The problem has arisen at the time of starting a demon and this said that the port that needed to use was already in use.

In HPUX (and other many Systems) you can see this information by use the next command;

lsof -i:<PORT NUMBER>

Example for port 2456;

lsof -i:2456

After that identified the pid and, if you need, kill it.

Lsof command is not only for sockets, from Doc;

Lsof show open files in the system include disk files, named pipes, network sockets and devices opened by all processes.

HTH – Antonio NAVARRO

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s