- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- is there a command to show ports being used
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
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
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
тАО12-05-2001 12:09 PM
тАО12-05-2001 12:09 PM
is there a command to show ports being used
which ports are being used on a unix server and how to kill the process/service using that port?
Thanx
MIke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:13 PM
тАО12-05-2001 12:13 PM
Re: is there a command to show ports being used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:13 PM
тАО12-05-2001 12:13 PM
Re: is there a command to show ports being used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:14 PM
тАО12-05-2001 12:14 PM
Re: is there a command to show ports being used
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.55/
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:14 PM
тАО12-05-2001 12:14 PM
Re: is there a command to show ports being used
once you install and run it you can find what process is holding what port open
netstat -a gives you a quick look-see of what port/sockets are in use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:21 PM
тАО12-05-2001 12:21 PM
Re: is there a command to show ports being used
Besides netstat -a the utility you will need is "lsof"
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:22 PM
тАО12-05-2001 12:22 PM
Re: is there a command to show ports being used
Use "netstat -an" to list all ports being used. you can also use lsof as advised above,
Here is the "lsof" FAQ,
ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/FAQ
You can download lsof from this site,
http://www-rcd.cc.purdue.edu/~abe/
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 12:22 PM
тАО12-05-2001 12:22 PM
Re: is there a command to show ports being used
/etc/services file actullay the reference file for all the assigned port and service
Typical services entries are of the form:
SERVNAME PORT/PROTO
From /var/adm/inetd.sec file you can control the access to any services .
Like every one said get lsof. It's a good tool to have.
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 01:52 PM
тАО12-05-2001 01:52 PM
Re: is there a command to show ports being used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2001 02:36 PM
тАО12-05-2001 02:36 PM
Re: is there a command to show ports being used
I got the file lsof-4.55-sd-11.00.depot.gz
from the website mentioned earlier. i run
gunzip on it to get lsof-4.55-sd-11.00.depot
Then I run the following to install lsof.
#swinstall -s /tmp/lsof-4.55-sd-11.00.depot
When I run swlist, it shows lsof4.55 installed.
But when I run "lsof -ou username", it pops up
"/sbin/sh: lsof not found".
Can you guys please suggest me the way out?
Thanks in advance!
Santanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-06-2001 09:05 AM
тАО12-06-2001 09:05 AM
Re: is there a command to show ports being used
# PATH=$PATH:/opt/lsof/bin
and then
# lsof
that should work... you might want to include it in your /etc/PATH file.
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2001 02:22 PM
тАО12-21-2001 02:22 PM
Re: is there a command to show ports being used
You are correct. I got it working.
Thanks
Santanu