[Linux-cluster] Clustat exit code for service status
Parvez Shaikh
parvez.h.shaikh at gmail.com
Wed Mar 16 05:07:55 UTC 2011
Hi all,
Command clustat -s <service name> gives status of service.
If service is started (i.e. running on some node), exit code of this command
is 0, if however service is not running, its exit code is non-zero (found it
to be 119).
Is this right and going to be continued in subsequent cluster versions as
well? Reason I am asking this, is if I can use this command in shell script
to give status of service -
clustat -s <service name>
if [ $? -eq 0 ]; then
echo "service is up"
else
echo "service is not up"
Thanks
Parvez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20110316/6590a48a/attachment.htm>
More information about the Linux-cluster
mailing list