- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to view the all opened ports and applicati...
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
тАО05-29-2009 11:46 AM
тАО05-29-2009 11:46 AM
I am using hpux 11.00 and 11.11.
I want to view all the opened ports and what are the applications are using that port?
In linux i can use "netstat" command with following options. but it is not working in hpux.
THESE COMMANDS ARE WORKING FOR LINUX VERY WELL.
To view that port / service (pop3 or smtp) / application (email or sendmail) are opened:
1) # netstat -na | grep :25 ---> to view port number only
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
n --> port number
a --> all (LISTEN & ESTABLISHED)
2) # netstat -tulpn | grep :25 | more --> to view with application name and LISTEN (OPENED ONLY)
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 23478/email
3) #netstat -tulpna | grep :25 | more ---> to view with application name and LISTEN & ESTABLISHED
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 23478/sendmail
tcp 0 0 127.0.0.1:62359 127.0.0.1:25251 ESTABLISHED 23478/sendmail
t-->tcp
u-->udp
l -->loopback (localhost)
p-->process name (application name)
n-->port number
a-->all (LISTEN & ESTABLISHED)
4) To view by service name (smtp or pop):
# netstat -a | grep smtp
tcp 0 0 *:smtp *:* LISTEN
Pls find the attachment for clear report
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2009 11:50 AM
тАО05-29-2009 11:50 AM
Re: How to view the all opened ports and applications in hpux
What is it that isn't working?
Have checked the netstat man page on your HP-UX servers to see what the command line options are?
Remember, HP-UX is NOT Linux!
If you want a cross-platform solution that **SHOULD** work almost the same in both Linux and HP-UX, use 'lsof'. You will have to load lsof on your HP-UX servers yourself, but it is available if you search for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2009 11:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2009 11:59 AM
тАО05-29-2009 11:59 AM
Re: How to view the all opened ports and applications in hpux
Use `lsof` to get the details on which port application is running.
Check the `man lsof` page for Details, There are examples included in the bottom of the man page.
eg. lsof -i tcp/udp
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2009 04:12 AM
тАО05-31-2009 04:12 AM
Re: How to view the all opened ports and applications in hpux
netstat is a common HP UX command all Unix flavours, it should work in HP UNIX also.
#netstat -a |grep "Port No"
for a detailed report on the opened port, you can use LSOF that you need to install separately if you dont find in the server.
/usr/sbin/lsof -i tcp |grep "port No"
Reffer the thread for LSOF download and installation,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=187859
also,
http://www.cmve.net/~merijn/
Regards,
Arun....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2009 10:09 PM
тАО05-31-2009 10:09 PM
Re: How to view the all opened ports and applications in hpux
To check all the application running in the system at that time
#ps -ef | grep
I think it will help you..
You can also check /etc/services to know about ports..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2009 01:56 AM
тАО06-01-2009 01:56 AM
Re: How to view the all opened ports and applications in hpux
Like linux, HP unix also having the same command to check open ports.
used netstat -a | grep "port no"
or netstat -a | grep -i ESTABLISHED
same thing you can get with lsof command
if lsof is not installed in your server then download from this below link install it, read the man page of lsof.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.82/
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2009 02:02 AM
тАО06-01-2009 02:02 AM
Re: How to view the all opened ports and applications in hpux
you can either check with nmap also.