- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- port usage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010 04:39 PM
04-05-2010 04:39 PM
Can you please let me know ..how can we find out an active port ...i need to verify if a particular port is free ...i tried using
netstat -a|grep port
it did not return anything - does that mean the port that i greped was free - and able to make use of it .
pls advice
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010 05:05 PM
04-05-2010 05:05 PM
SolutionDid you actually use "port", or did you
specify some port number or service name?
Are you hiding important details only to make
this stuff more difficult, or did you have
some valid reason?
If you're looking for a number, then you
might do better with:
netstat -an
> ...i need to verify if a particular port is
> free [...]
Which "a particular port"? Why? Normally,
if you try to use a port which is already in
use, someone complains.
> [...] does that mean [...]
If I could see what you actually did, then I
might be able to tell you what it actually
means. Sadly, my psychic powers are very
weak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010 07:07 PM
04-05-2010 07:07 PM
Re: port usage
netstat -an | grep ${port}
is the right command. The -n option will circumvent dns lookups.
netstat -an | grep " 22 "
for instance, will show you the sshd daemon.
Another option is lsof although that doesn't come with the generic OS. I believe you can download it from software.hp.com or from one of the porting centers.
lsof -i :22
will show all the processes that are using port 22. It's a bit better than the netstat option, but, if you don't have lsof, your options are obviously somewhat limited...
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010 09:06 PM
04-05-2010 09:06 PM
Re: port usage
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2010 09:24 PM
04-05-2010 09:24 PM
Re: port usage
i need to use the port 9876 - once i grep it from netstat -an |grep -i 9876 - if it does not return anything - i'm safe to use that port right.
yes it should be possible to assign the port for your purpose.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2010 03:22 AM
04-06-2010 03:22 AM
Re: port usage
Well, no one else is using it now. If that
means "safe", then you're safe.