HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- checking port number
Operating System - HP-UX
1829596
Members
1849
Online
109992
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
10-08-2002 11:49 PM
10-08-2002 11:49 PM
checking port number
HI,
How do I check if a particular port number is already being used by another process in a client-server communication?
I did:
# netstat |grep 7412
which displays all machines communicating with the local machines on the respective port numbers. I'd have to then check each port numbers used for within the local machine to see if the number which I'm looking for is that list or not.
Are there any other more efficient way of doing this? Or could anyone show me how I could write a script do check if a particular port number is already been used, then generate another number?
Thanks.
How do I check if a particular port number is already being used by another process in a client-server communication?
I did:
# netstat |grep 7412
which displays all machines communicating with the local machines on the respective port numbers. I'd have to then check each port numbers used for within the local machine to see if the number which I'm looking for is that list or not.
Are there any other more efficient way of doing this? Or could anyone show me how I could write a script do check if a particular port number is already been used, then generate another number?
Thanks.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2002 11:57 PM
10-08-2002 11:57 PM
Re: checking port number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2002 11:59 PM
10-08-2002 11:59 PM
Re: checking port number
You need to download and install 'lsof' from the HP porting centre.
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
If your after the 64 bit version, this link will help.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1de9f715edc6d5118ff10090279cd0f9,00.html
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
If your after the 64 bit version, this link will help.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1de9f715edc6d5118ff10090279cd0f9,00.html
Anyone for a Mutiny ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2002 12:16 AM
10-09-2002 12:16 AM
Re: checking port number
Once you've downloaded and install 'lsof' here is a frew examples of it's usage.
To which files are open for a given process id (pid)
# lsof -p
To see all the open files associated with a particular command.
# lsof -c midaemon
User name.
# lsof -u
# lsof -u
processes being used via a socket.
# lsof -i tcp:23
# lsof -i udp:123
To which files are open for a given process id (pid)
# lsof -p
To see all the open files associated with a particular command.
# lsof -c midaemon
User name.
# lsof -u
# lsof -u
processes being used via a socket.
# lsof -i tcp:23
# lsof -i udp:123
Anyone for a Mutiny ?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP