1752777 Members
5889 Online
108789 Solutions
New Discussion юеВ

Re: find port number

 
madhuchakkaravarthy
Trusted Contributor

find port number

how to find the port number in hp-ux
5 REPLIES 5
R.O.
Esteemed Contributor

Re: find port number

Hi,

You can see the known port numbers and the user defined port numbers in file "/etc/services".
If you want to see the port number currently being used by an application, you can issue:

# netstart -an

Her you will see the local and remote port numbers.

Regards,
"When you look into an abyss, the abyss also looks into you"
R.O.
Esteemed Contributor

Re: find port number

Typo:

# netstat -an

Regards,
"When you look into an abyss, the abyss also looks into you"
Kapil Jha
Honored Contributor

Re: find port number

what port number you want to find,
do u just want to find a random port number or some specific port number.

normally u can see the port in /etc/system file
and you would see the port listening only when service is UP.
you can check the ports in netstat -a and lsof would also show

BR,
Kapil+
I am in this small bowl, I wane see the real world......
rariasn
Honored Contributor

Re: find port number

Hi,

# lsof -i:port_number

rgs,
Torsten.
Acclaimed Contributor

Re: find port number

Port number of what?

Maybe best results with

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.83/

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!