- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need to use pkg ip.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:33 AM
07-11-2002 11:33 AM
Need to use pkg ip.
We need to script on a service guard requirement and we need to use the package ip in that script. how do i get the package ip from a running box. Can anyone help please?
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:44 AM
07-11-2002 11:44 AM
Re: Need to use pkg ip.
Usually in /etc/cmcluster/pkg_name
It will be defined in there.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:46 AM
07-11-2002 11:46 AM
Re: Need to use pkg ip.
The package ip will be there if you have defined so. It is there in the package control scripts. /etc/cmcluster/pkgname/pkg.script
When you configure the packgae on the cluster you can define the ip for the package which works with the package. When your users want to use that package they can access the package using the package ip
You can define it in package control script and the variable is
IP[0]=a.b.c.d
SUBNET[0]=a.b.c.0 # Netmask = 255.255.255.0
Here a.b.c.d is the package ip of the package
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:52 AM
07-11-2002 11:52 AM
Re: Need to use pkg ip.
In the file it will be in the field
IP[0]=111.222.111.222
The # in brackets could be larger IF there are mult IPs being asserted by the pkg.
IF you can't check that file you could do
netstat -in
And virtual IPs will have entries like
lan0:1 1500 111.222.111.0 111.222.111.222 ...etc
The key is the colon in the lan name. Note there may be several AND the pkg MUST be up to check it this way.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:54 AM
07-11-2002 11:54 AM
Re: Need to use pkg ip.
Try "netstat -i". Look at the ipaddress associated with lan0:1 lan0:2, lan1:1, lan1:2 and such. These are virtual ip's associated with lan0 and lan1 and are actually virtual ip's of the packages.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:09 PM
07-11-2002 12:09 PM
Re: Need to use pkg ip.
If you have not configured the virtual ip address the use ifconfig to configure them.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:10 PM
07-11-2002 12:10 PM
Re: Need to use pkg ip.
I am sorry. I should have given more detail. we have /etc/cmluster/pkdir and then pkg.script and all those stuff. But is there a way around with a command to get the package ip.
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:19 PM
07-11-2002 12:19 PM
Re: Need to use pkg ip.
You could grep for it in the file & cut it out - EX:
grep IP pkg_name.ctl | grep = | grep -v "*" | cut -d = -f 2
That should give only the actual IP.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:25 PM
07-11-2002 12:25 PM
Re: Need to use pkg ip.
I don;t think there is any SG command which can tell you about the package virtual ip address. If the package virtual ip address is configued into the dns then you can get this ipaddress from the DNS.
nslokup pkh_name.domain.com
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:35 PM
07-11-2002 12:35 PM
Re: Need to use pkg ip.
But "cmviewcl -n $(hostname)" will show what is running on the current node. A package does not have to have an IP number. We have a SG monitor package that has no package IP.
But you could take the above output and grep for "enabled" and then "awk '{print $1}'" to get local running packages. Then grep for the IP from the /etc/cmcluster/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:41 PM
07-11-2002 12:41 PM
Re: Need to use pkg ip.
We already have the package name and the machines are running in production now for 6 mounths with service guard. We have one package on each box(total 4 boxes). The script which i run when it installs tries to query the system for package ip. I do not want to query the /etc/cmluster/pkg dir.
Currently i do netstat -i, i find on the address column (4 th column) the package name but strangely the Network coloumn(ip address)
i find is that of the router. Is that not strange?? why would that happen?
Thanks
Brian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 12:57 PM
07-11-2002 12:57 PM
Re: Need to use pkg ip.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 01:04 PM
07-11-2002 01:04 PM
Re: Need to use pkg ip.
run netstat -ni to find out and check the output properly.
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 01:12 PM
07-11-2002 01:12 PM
Re: Need to use pkg ip.
Well you can certainly use netstat -in to get the virtual IP, but what happens IF down the road you add more virtual IPs? Which one would be correct - and - how would you determine that?
If you obtain the IP from the pkg definition or control script you KNOW you've got the correct IP(s). And this method would work on any system using any NIC. You just check the proper filename.
Then you can determine what you need from there - like is it asserted (pkg up?) or whatever (stats?) else you might need.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 01:30 PM
07-11-2002 01:30 PM
Re: Need to use pkg ip.
You will surely get correct information from your cntl file. So, I also suggest you to get it from there.
awk '/^IP/ {FS="=";printf $2 " " } END {print }' /etc/cmcluster/package/package.cntl
If you have multiple virtual IPs, the above will list them in one line.
-Sri