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;
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