#!/bin/sh
###########################################################################
# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development, LP.
# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
# @(#) Utility to check Serviceguard Cluster Analytics Daemon status
# @(#) Product Name     : HP Serviceguard Cluster Analytics 
# @(#) Product Version  : A.12.10.00
# @(#) Patch Name       : 
#
#
# *** Note: This file MUST NOT be edited. *****
#
# Any changes made to it will be overwritten when you upgrade to the
# next release of HP Serviceguard Cluster Analytics.
#
# Changing this file may lead to unrecoverable
# Cluster Analytics daemon failure or may lead to issues related
# to administration of Cluster Analytics daemon and displaying 
# KPIs 
#
#
############################################################################
# Description:  cmcastat is a wrapper script for checking the
#               current status of Serviceguard Cluster Analytics Daemon.
# Returns:         0       if successful
#                  1       if failed
#
#
############################################################################

ps_analytics_daemon=`/usr/bin/pgrep cmanalyticsd`;

function check {
    if [ $ps_analytics_daemon > 0 ]
    then
        exit 0
    fi
}

check

exit 1
