HP Serviceguard manual I L I T Y N C T I O N S

Models: Serviceguard

1 407
Download 407 pages 39.81 Kb
Page 393
Image 393

# *

"sg/generic_resource" modules need to be specified in the package *

# *

configuraton file in order to configure these parameters.

*

# *

 

 

*

# *

 

 

*

# *

---------------------------------

*

# *

U T I L I T Y

F U N C T I O N S

*

# *

---------------------------------

*

# *

The following utility functions are sourced in from $SG_UTILS

*

# *

($SGCONF/scripts/mscripts/utils.sh) and available for use:

*

# *

 

 

*

# *

sg_log <log level> <log msg>

*

# *

 

 

*

# *

By default, only log messages with a log level of 0 will

*

# *

be output to the log file. If parameter "log_level" is

*

# *

configured in the package configuration file, then log

*

# *

messages that have a log level that is equal to or

*

# *

greater than the configured log level will be output.

*

# *

 

 

*

# *

In addition, the format of the time stamp is prefixed in

*

# *

front of the log message.

*

# *

 

 

*

# *

 

 

*

#**********************************************************************

###################################################################

###########################

#Source utility functions.

###########################

if [[ -z $SG_UTILS ]] then

. /etc/cmcluster.conf

SG_UTILS=$SGCONF/scripts/mscripts/utils.sh

fi

if [[ -f ${SG_UTILS} ]] then

. ${SG_UTILS} if (( $? != 0 )) then

echo "ERROR: Unable to source package utility functions file: ${SG_UTILS}" exit 1

fi

else

echo "ERROR: Unable to find package utility functions file: ${SG_UTILS}" exit 1

fi

#########################################################################

#

#start_command

#This function should define actions to take when the package starts

#########################################################################

function start_command

{

sg_log 5 "start_command"

#ADD your service start steps here return 0

}

#########################################################################

#

#stop_command

#This function should define actions to take when the package halts

Template of a Monitoring Script 393

Page 393
Image 393
HP Serviceguard manual I L I T Y N C T I O N S