- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Ports - How to know which application is using cer...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО01-29-2009 06:22 PM
тАО01-29-2009 06:22 PM
I know I can use netstat -antup in linux, but can this be done in HP-UX?
Thanks.
Solved! Go to Solution.
- Tags:
- Port
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2009 11:32 PM
тАО01-29-2009 11:32 PM
SolutionYou can dowload it from:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.81/
An example:
lsof -i tcp:80
this gives you the proccess runing on that port, have a look at the man page for all the ops
- Tags:
- lsof
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2009 11:39 PM
тАО01-29-2009 11:39 PM
Re: Ports - How to know which application is using certain ports
You'll need to install the free open-source "lsof" utility and use it to identify the programs using each port. It is available as a .depot in the HP-UX Porting Archive.
http://hpux.asknet.de/hppd/hpux/Sysadmin/lsof-4.81/
lsof uses a more flexible syntax. To find out the name of the process using a single known port and protocol (TCP or UDP), you can use something like this:
# lsof -i tcp:22
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sshd 3858 root 3u IPv4 7908 TCP *:ssh (LISTEN)
I.e. the process using the TCP port 22 was named "sshd", process ID 3858.
You can also list all the network connections at once, with just "lsof -i". There are many other qualifiers you can use to restrict lsof output as necessary.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 01:11 AM
тАО01-30-2009 01:11 AM
Re: Ports - How to know which application is using certain ports
But if lsof is not possible to be installed in my system. Can I use any other method?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 01:25 AM
тАО01-30-2009 01:25 AM
Re: Ports - How to know which application is using certain ports
otherwise no, there is no easy way short of writing code to do it (and in that case you might as well install lsof)
In 11iv3 we have the "pfiles" command built in which will do this, but nothing in netstat.
Rememeber 11.11 is now a 9 year old OS, so don't be too hard on it - compare it to Windows 2000, Solaris 7/8 and AIX 4, not too a modern Linux distro.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 04:44 PM
тАО01-30-2009 04:44 PM
Re: Ports - How to know which application is using certain ports
netstat -a will show you ports in use but only label the well known services
- Tags:
- netstat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 07:13 PM
тАО01-30-2009 07:13 PM
Re: Ports - How to know which application is using certain ports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 08:48 PM
тАО01-30-2009 08:48 PM
Re: Ports - How to know which application is using certain ports
You can check by netstat -a | more
Rgds,
Taifur