1831816 Members
2748 Online
110030 Solutions
New Discussion

trace ip

 
???_185
Regular Advisor

trace ip

hi!
Is it possible to trace ip address by using user process?
6 REPLIES 6
Rajeev  Shukla
Honored Contributor

Re: trace ip

Hi Zungwon,

Yes there is a way by using lsof with the option for the PID, use
lsof -p
this will return you TCP address in the last field

Cheers
Rajeev
Muthukumar_5
Honored Contributor

Re: trace ip

You have to use lsof tool to find out the ip-address with process ID. If you want to check ip-address based on port number then use netstat -na will give that too.

-Muthu
Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: trace ip

Yes, It is possible to trace IP by user processes, either use lsof which can be downloaded from., http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.75/

or, you can use # netstat -na

Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 0 127.0.0.1.51989 127.0.0.1.5798 ESTABLISHED


-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Tvs
Regular Advisor

Re: trace ip

HI Rajeev Shukla

where i can find the lsof command. is it a default command in hp..

regards

tvs
Arunvijai_4
Honored Contributor

Re: trace ip

Hi Tvs,

"lsof" is not part of HP-UX, you can download depot from the link above which i have already given.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Tvs
Regular Advisor

Re: trace ip

hi arun

thanks.

regards
tvs