Operating System - HP-UX
1834789 Members
3016 Online
110070 Solutions
New Discussion

can you tie an ip address to a pid?

 
Mark Grossman
Regular Advisor

can you tie an ip address to a pid?

running hp-ux 11.0 with Oracle 7.3.4 db

If a customer gives us their ip address, is there a way to tie this to their process
id(s)?

Ive been told that a past sysadmin had some utility or script to do this. When a customer had a problem he'd run this and then kill their processes based on ip address. I'm fairly new at this and I cant find any way to do this. I've tried the 'owners' utility(among others) but it doesnt show pid.
thanks,
Mark Grossman
5 REPLIES 5
frank beall_1
Occasional Advisor

Re: can you tie an ip address to a pid?

Try
who -a

This will show you the ip address,user and pid.
yow
Mark Grossman
Regular Advisor

Re: can you tie an ip address to a pid?

Frank,
thanks, but unfortunately these customers login to Oracle apps and not to Unix. So all i see is a user called applmgr from the Unix side.

thanks again,
Mark
Steven Sim Kok Leong
Honored Contributor

Re: can you tie an ip address to a pid?

Hi,

1) netstat -f inet|grep oralsnr
- if oralsnr is defined in /etc/services as the oracle listener service name

2) netstat -f inet|grep 1521
- if your oracle listener is listening at port 1521

3) Use lsof
- if you are unable to identify the service from the netstat output but you are able to identify the process(es) that runs your Oracle server daemons.

Regards.

Steven Sim.
Rick Garland
Honored Contributor

Re: can you tie an ip address to a pid?

lsof would be your best bet.
It is available from the HP Porting Archive.
Mark Grossman
Regular Advisor

Re: can you tie an ip address to a pid?

thanks Steven and Rick - the netstat still doesnt get me the pid - but I will try lsof, as Ive been reading a lot about that the last few days.

thanks,
Mark