Tricky situation getting IP address | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Tricky situation getting IP address

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-05-2013
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 1 December 2014, 10:24 AM EST
Posts: 362
Thanks: 81
Thanked 0 Times in 0 Posts
CPU & Memory Tricky situation getting IP address

Hi,

I have a multihomed system HP-UX with two NIC cards having IP address 10.9.0.13 & 10.9.0.45

I have two weblogic servers running one listening on "10.9.0.13" and the other on "10.9.0.45"

Given a PID how is it possible to extract the IP Address that the weblogic server is using and store it in a bash variable "myh" ?

I am looking for a solution for HP-UX and then for all Linux and Unix systems so if you could share some solution for HP-UX and others as well.
Sponsored Links
    #2  
Old 03-05-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 19 December 2014, 1:03 PM EST
Location: Lancashire, UK
Posts: 1,939
Thanks: 635
Thanked 338 Times in 306 Posts
If you have lsof installed you can get very useful information out of that.

You can get lsof as a free download from sourceforge I think.


Code:
lsof -o -p PID

If you know the port that it connects on, you could use netstat:-


Code:
netstat -na|grep "\.port "


I hope that this helps.


Robin
Liverpool/Blackburn
UK
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
help : crisis situation !! Eisa UNIX for Dummies Questions & Answers 5 01-11-2008 03:17 AM
strange situation in file arunkumar_mca Programming 0 11-13-2007 06:09 AM
sed situation Laurel Maury Shell Programming and Scripting 4 10-05-2006 02:19 PM
sed substitute situation newbreed1 UNIX for Dummies Questions & Answers 16 06-03-2005 03:26 PM
current situation joanne6298 UNIX for Advanced & Expert Users 2 08-06-2003 11:26 AM



All times are GMT -4. The time now is 04:06 PM.