Script for monitoring status of GiCAP groups and group managers

2
Why do we need GiCAP group status monitoring?
Sometimes a system administrator can be unaware that there are problems with the GiCAP groups or group managers,
and the problems can persist for a long time before any action is taken.
A white paper that describes these problems and steps to prevent them is available at
Cost-effective high-availability
solutions with HP Instant Capacity on HP Integrity Superdome 2 with HP-UX 11i v3.
A sample script has been written that can be used to obtain a summary of the status of the GiCAP group and group
managers logged on a daily basis. The script is intended to be run from cron(1M). The entire script is included below in
this document. It can be used as is,or modified to suit your specific needs. The script includes instructions for adding it
to root’s crontab(1). If there are problems with the GiCAP group or group managers, they will be logged and the system
administrator will be able to correct the situation before it escalates into a critical issue with the use of this script.
Script
#!/usr/bin/sh
#
# File: monitor_GiCAP.sh
# Purpose: This script is meant to be run as a cron job on the AGM and
# SGM on a periodic basis for the purpose of monitoring the status of
# the GiCAP groups and Group Managers.
# Instructions:
# 1. Save this file in a directory such as /usr/local/bin.
# 2. Add an entry to root's crontab -- see crontab(1).
# An example crontab entry would be:
# 0 0-23 * * * /usr/local/bin/monitor_GiCAP.sh
#
# (C) Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Disclaimer: This script is meant to be an example that should be
# modified by the user to meet their specific needs.
#
# DISCLAIMER OF WARRANTY
# The following software: monitor_GiCAP.sh is experimental and is provided as
# a courtesy, free of charge, "AS-IS" by Hewlett-Packard Company ("HP").
# HP shall have no obligation to maintain or support this software.
# HP makes no express or implied warranty of any kind regarding this software
# including any warranties of merchantability, fitness for a particular purpose,
# title, or non-infringement. HP shall not be liable for any direct, indirect,
# special, incidental or consequential damages, whether based on contract, tort or
# any other legal theory, in connection with or arising out of the furnishing
# performance or use of this software.
PATH=/bin:/usr/bin:/usr/sbin
export PATH
TMP_FILE=/tmp/gicap_$$
CIM_PROVIDER=/opt/wbem/bin/cimprovider
GiCAP_PROVIDER=HP_GiCAPProviderModule
NPar_PROVIDER=HP_NParProviderModule
# Here're the parameters to customize log file policy configurations
LOGFILE=/var/adm/GiCAP2.log
LOGSIZE=5000 # unit: Bytes
LOGPERMISSION=644 # Log file permission
LOGOWNERSHIP=root:sys # Log file ownership
LOGNUMBACKUP=5 # log, log.1, .., log.N
#############################################################
# Look into the GM status from variety of perspectives.