Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > HP-UX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-07-2008, 08:25 PM
newa
 
Posts: n/a
Default how to find out which process is listening to which port

Hi,

On HP-UX I am trying to determine the process name/id that is bound to
a particular port. On linux I can use "netstat -ap" but on hp-ux
"netstat -p" means differently. The HP site suggested to use lsof but
its binary is outdated on the box that I am on (lsof: WARNING:
compiled for HP-UX release B.11.11; this is B.11.23...)

So are there any other ways to do this on HP-UX?

Thanks a lot in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-07-2008, 08:25 PM
Rick Jones
 
Posts: n/a
Default Re: how to find out which process is listening to which port

newa <DavidLLiu1@gmail.com> wrote:
> On HP-UX I am trying to determine the process name/id that is bound
> to a particular port. On linux I can use "netstat -ap" but on hp-ux
> "netstat -p" means differently. The HP site suggested to use lsof
> but its binary is outdated on the box that I am on (lsof: WARNING:
> compiled for HP-UX release B.11.11; this is B.11.23...)


> So are there any other ways to do this on HP-UX?


There may be some ways to use pstat() calls - that is probably what
lsof is doing. You should simply get an 11.23 lsof binary - perhaps
via http://hpux.connect.org.uk/

What is leading you to want to do this? Trouble restarting a server
on a "well-known" port? If so, then you should not need to find an
offending pid unless it has a socket bound to that port number and in
the LISTEN state (assuming TCP) unless your server code isn't setting
SO_REUSEADDR before trying to bind().

rick jones
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62