HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Showing results for 
Search instead for 
Did you mean: 

Ports in listening mode

Super Advisor

Ports in listening mode


What's the easiest way to identify if a port on our unix box is in listening mode or not ?

I'm trying to identify if tsm ports ie 1500 to 1516 are in listening or not ?

Super Advisor

Re: Ports in listening mode

By the way im trying to use netstat -an|grep 1516 but nothing displays, and more importanly which bits tells u if it's listening ?
Kapil Jha
Honored Contributor

Re: Ports in listening mode

you can try

#telnet IP 1516

You can see if its listening else connection refused.

I am in this small bowl, I wane see the real world......
Jim Walls
Trusted Contributor

Re: Ports in listening mode

netstat -an|grep LISTEN|grep \.15..

(Note the two training "." characters)

Run this on the server where you expect the process to be listening. If you get nothing then there is no process currently listening on a port in that range.

If you have lsof you can run:

lsof -i:1500-1516

Super Advisor

Re: Ports in listening mode

Sory for the late reply as I was away in remote location.

Thanks guys, appreciate your prompt help.

I knew telnet to port one but I wasn't quite
sure about netstat one which Jim has clarified.

Many Thanks again..
Viktor Balogh
Honored Contributor

Re: Ports in listening mode


If you are curious, what process is listening on that port, you can use lsof to check it:

# lsof -i :1500

lsof is an extra tool, you should install it separately. You can download the HP-UX version of it from the porting center:


Only a short supplement: if you would be on linux, there's no need for "grep -i listen", there is a -l switch for netstat...

Unix operates with beer.