Tool

List Running Resources on V1-style Heartbeat Cluster Node

tool
Reads:

2275

Score:
0
0
 
Comments:

0

license: 
GPL

This script is the product of my need for a tool that shows me the running resources on a heartbeat V1 node.

Installation and configuration is rather straight forward:

Prequisites are a heartbeat V1 style cluster and the python package. I think they depend on each other.

Copy the file to a location of your choice. I use /usr/sbin/.

Make it executable with following command:

sles:~/ # chmod 755 ./hb_resources

A configuration isn't nessesary if you use the standard path defined by SuSE. If you don't, edit the file:

sles:~/ # vi ./hb_resources 

After that you can run it like this:

sles:~/ # hb_resources
This Node is the master for the following resources:
192.168.10.2, apache2, vsftpd

Running resources:
192.168.10.2, apache2, vsftpd

As you see above it will tell you what resources should, and what resources are running.

If the heartbeat service is not started or the cluster is switched it will look like this:

sles:~/ # hb_resources
This Node is the master for the following resources:
192.168.10.2, apache2, vsftpd

Running resources: 
None.

I hope this script helps you to keep on top of things, at least till you switch to a V2 style cluster. ;-)

Warning: This script only works in V1 style clusters as V2 style clusters don't use the "haresources" file.

AttachmentSize
hb_resources.zip1.28 KB




User Comments

© 2009 Novell, Inc. All Rights Reserved.