finding a process running on a port | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

finding a process running on a port

UNIX for Advanced & Expert Users


Tags
solaris

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-10-2004
manduva manduva is offline
Registered User
 
Join Date: Feb 2004
Last Activity: 12 February 2004, 5:51 AM EST
Location: Tokyo
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
finding a process running on a port

how do I find the process that is running on a port in HP-Unix?

Murali
Sponsored Links
    #2  
Old 02-10-2004
davidg's Avatar
davidg davidg is offline
Registered User
 
Join Date: Jul 2003
Last Activity: 23 February 2004, 11:09 AM EST
Location: Holland
Posts: 207
Thanks: 0
Thanked 1 Time in 1 Post
netstat -a
Sponsored Links
    #3  
Old 02-10-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
netstat -a won't identify the process. For that you need lsof -i.
    #4  
Old 02-10-2004
manduva manduva is offline
Registered User
 
Join Date: Feb 2004
Last Activity: 12 February 2004, 5:51 AM EST
Location: Tokyo
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

But i don't think we have lsof on HP. As far as my knowledge goes it is there on Solaris only. Is that right dude?

Murali
Sponsored Links
    #5  
Old 02-10-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
Funny you should ask. I was the first person to port lsof to HP-UX.... but that was HP-UX 3.1. lsof has been available for every version of HP-UX since then.

Actually, lsof is available for virtually every version of unix.

You can get lsof for HP-UX at The HP-UX Porting and Archive Centre
Sponsored Links
    #6  
Old 02-11-2004
davidg's Avatar
davidg davidg is offline
Registered User
 
Join Date: Jul 2003
Last Activity: 23 February 2004, 11:09 AM EST
Location: Holland
Posts: 207
Thanks: 0
Thanked 1 Time in 1 Post
Uuuh, mister Manduva.

Perderabo is not a "Dude", but as he shows a master.
Try to be polite and respectfull.

Thanks Perderabo.
netstat -a does show you the process where you can grep for using ps. Indeed lsof is much more suited for this job.

Regs David
Sponsored Links
    #7  
Old 02-11-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 November 2014, 10:48 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 438 Times in 261 Posts
Actually, I sometimes use "dude" myself. I doubt that it was intended as an insult or anything.

But you'l have to help me out with your use of netstat. How do you reach the pid starting from the output of netstat?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Process running on which port amity AIX 0 09-19-2011 03:51 AM
Process running on which port amity Solaris 1 09-19-2011 03:24 AM
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 13 03-06-2009 07:33 AM
Finding port number !! kumarmani Solaris 11 10-08-2008 06:32 AM
finding port numbers darkcastle IP Networking 3 03-27-2004 03:19 AM



All times are GMT -4. The time now is 01:09 AM.