Re: Need simple RHEL4.0 clarification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Markos for your quick reply.
But I am wondering why RHEL is not complying to backward compatibility. Murphy's law does work well ! I feel RHEL3.0 to RHEL4.0 cli and output format all are changed/missing ( Ofcourse there are new cli features)
thanks
- Krishna

----- Original Message ----
From: Marcos David <marcos.david@xxxxxxxxx>
To: linux clustering <linux-cluster@xxxxxxxxxx>
Sent: Thursday, December 14, 2006 5:19:36 PM
Subject: Re: [Linux-cluster] Need simple RHEL4.0 clarification

Hello

1 - ccs_tool lsnode gives you the Cluster name and node names

2 - this as already been posted here a few weeks ago (title: ccs_test
tool on 2006-11-15)
Basically you need to create a script to parse the contents of the
cluster.conf file.

Anyway here a simple script we came up with to do this:


filename:get_service_ip.py
--- CUT HERE ---

#!/usr/bin/python

# GET IP FROM SERVICE CONFIG
import xml.dom.minidom, sys
doc = xml.dom.minidom.parse('/etc/cluster/cluster.conf')
services=doc.getElementsByTagName('service')
for service in services:
        name=service.getAttribute('name')
        try:
                if (name==sys.argv[1]):
                        ips=service.getElementsByTagName('ip')
                        for ip in ips:
                                ref=ip.getAttribute('ref')
                                print ref
        except:
                pass

-- CUT HERE ---

You can get the ip like this:

get_service_ip.py <service name>

Example:
#  get_service_ip.py mysql
192.168.0.2

Hope this helps

Greetings
Marcos David



krishnamurthi G wrote:
> Dear friends,
>
> I am working on a project on RHEL 4.0 cluster platform.
> I appreciate if you could help/give me pointer me for below queries as
> I couldn't find it.
>
> 1. What is the command to find cluster name/how to extract cluser name?
>    ( RHEL 3.0 we can extrsact cluster name either by clustat or
> redhat-config-cluster-cmd --cluster)
>
> 2. What is the command to see service(virtual) IP address for given
> service/group.
> ( RHEL 3.0 redhat-config-cluster-cmd --service=<service name>
> --service_ipaddresses would work )
>
> Thanks in advance
> - Krishna
>
> ------------------------------------------------------------------------
> Everyone is raving about the all-new Yahoo! Mail beta.
> <http://us.rd.yahoo.com/evt=45083/*http://advision.webevents.yahoo.com/mailbeta>
>
> ------------------------------------------------------------------------
>
> --
> Linux-cluster mailing list
> Linux-cluster@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/linux-cluster


--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster



Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.
--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux