#!/bin/ksh -p # # vx_group: Sun Enterprise Server check - BB external script test # # version 1.0 # version 1.1 - properly uses $CAT instead of cat # version 1.2 - properly uses $MACHINE instead of `uname -n` in bb-hosts check # version 1.3 - properly uses $THIS_HOST instead of $MACHINE due to fqdn using comma in name - thanks Craig Cook # version 1.4 - echoes some additional info if vxiod fails now. # version 1.5 - uses new variables (VX_DISK_LIST, DMP_DEV_LIST) from bbsys.local # # BIG BROTHER / XXXXXXXXXXXXXXXX status # # Written by Paul A. Luzzi # on March 22, 2000 # ######################################## # NOTE # This has been tested with BB 1.2b, 1.4h2, 1.5, 1.5a # # Tested on : # Sun Ultra 60, E220R/420R, E250/450, E3000/3500, E4500 ######################################## ######################################## # INSTALLATION # step 1 - update the EXT section of the runbb.sh script to include this # ... ######################################## ################################## # CONFIGURE IT HERE ################################## ################################## # Start of script ################################## if test ! "$BBHOME" then echo "template: BBHOME is not set" exit 1 fi if test ! -d "$BBHOME" then echo "template: BBHOME is invalid" exit 1 fi if test ! "$BBTMP" # GET DEFINITIONS IF NEEDED then echo "template: The BB environment is not set" exit 1 fi ##### ##### Start of custom section added by Paul A. Luzzi ##### ##### ##### Get Status proc - used to get all responses ##### get_status() { ##### ##### Setup any and all variables before beginning. ##### ##### ##### Modified extensively on 03-22-2000 by Paul A. Luzzi ##### for use with Big Brother ##### ##### Purpose is to report back to a central server, all "standard" ##### detailed information about network, disk, volume, cpu, memory ##### which is not reported thru regular "easy" checks. ##### ##### Any problem areas should be highlighted in : ##### bold, italics, and red font. ##### ##### ##### Setup some variables for use later ##### COLOR="green" ##### ##### Veritas Process Information ##### echo "


" echo "============== Verify that the Volume Manager Processes exist ==============" echo "============== vxrelocd, vxconfigd, vxnotify,vxiod ==============" echo "--- (ps -ef | grep vx) ---" echo "--- (vxiod) ---" echo "
" echo "
" $PS | $GREP vx | $GREP -v grep | $GREP -v bb | $SORT > /tmp/$THIS_HOST.vx_group.procs if [ ! -s /tmp/$THIS_HOST.vx_group.$$ ] then $CAT /tmp/$THIS_HOST.vx_group.procs else COLOR="red" echo "No Veritas processes running !!!" fi echo "
" echo "
" CATCH_COMMAND=` $VXIOD ` if [ "$?" = "0" ] then echo "$CATCH_COMMAND" else COLOR="red" echo "vxio processes not running !!!" echo "Results were :" echo "$CATCH_COMMAND" fi echo "
" ##### ##### Veritas Info - disk group list. ##### echo "


" echo "============== Veritax Disk Group List ==============" echo "--- (vxdg list) ---" echo "
" echo "
" CATCH_COMMAND=` $VXDG list ` CATCH_COMMAND2=` $VXDG list | $EGREP -v "enabled|STATE" ` if [ -z "$CATCH_COMMAND2" ] then echo "$CATCH_COMMAND" else COLOR="red" echo "Problem with vxdg list. Some disk groups not enabled !!!" echo "$CATCH_COMMAND" fi echo "
" ##### ##### Make sure to export COLOR so that it gets back to "central" ##### export COLOR ##### ##### Cleanup ##### if [ -s /tmp/$THIS_HOST.vx_group.procs ] then $RM -f /tmp/$THIS_HOST.vx_group.procs fi ##### ##### End of get_status proc ##### } ##### ##### Main body ##### touch /tmp/$THIS_HOST.vx_group $GREP $THIS_HOST $BBHOSTS | $GREP "vx_group" | while read line do if [ ! -z "$line" ] then echo "

" > /tmp/$THIS_HOST.vx_group echo "Veritas disk group check on $THIS_HOST " >> /tmp/$THIS_HOST.vx_group echo "Captured : `$DATE` " >> /tmp/$THIS_HOST.vx_group get_status >> /tmp/$THIS_HOST.vx_group $BB $BBDISP "status $THIS_HOST.vx_group $COLOR `$DATE` `$CAT /tmp/$THIS_HOST.vx_group` " else COLOR="clear" $BB $BBDISP "status $THIS_HOST.vx_group $COLOR `$DATE` `$CAT /tmp/$THIS_HOST.vx_group` " fi done ##### ##### End of custom section added by Paul A. Luzzi ##### ############################################## # end of script ##############################################