#!/bin/ksh -p # # vx_check: 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.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 : # Ultra 60, Sun 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 Info. ##### echo "
" CATCH_COMMAND=` for VX_DISK in $VX_DISK_LIST do $VXDISK check $VX_DISK done ` CATCH_COMMAND2=` for VX_DISK in $VX_DISK_LIST do $VXDISK check $VX_DISK done | $GREP -v Okay` if [ -z "$CATCH_COMMAND2" ] then echo "$CATCH_COMMAND" else COLOR="red" echo "Problem with some disks !!!" echo "\nActual output was : \n\n$CATCH_COMMAND" fi echo "" ##### ##### Make sure to export COLOR so that it gets back to "central" ##### export COLOR ##### ##### End of get_status proc ##### } ##### ##### Main body ##### touch /tmp/$THIS_HOST.vx_check $GREP $THIS_HOST $BBHOSTS | $GREP "vx_check" | while read line do if [ ! -z "$line" ] then echo "