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.