Re: Clustat exit code for service status

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

 



On Wed, Mar 16, 2011 at 10:37:55AM +0530, Parvez Shaikh wrote:
> 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 -

Yes.

> clustat -s <service name>
> if [ $? -eq 0 ]; then
>   echo "service is up"
> else
>   echo "service is not up"

That's right.

-- 
Lon Hohberger - Red Hat, Inc.

--
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