A number of people have asked for my wee scripts that show whether
NetView is alive or not. nv_daemon_check.sh simply echos out an
ovstatus - uncomment the 2 Nways lines if you also have the Nways
products.
nv_daemon_fail.sh does a similar test but checks whether any daemons are
down and uses ovxbeep to put up a beeping window if any are dead. (You
may need to add DISPLAY variables to your ovxecho, depending on your
situation).
As you can see, I use a temporary file that I normally put in
/usr/OV/conf/<client_name>. The reason for the scripts is that I then
create Tivoli Tasks and Jobs that can then go on an operators Tivoli
Desktop.
Nothing like rocket science but if it helps anyone, you're welcome!
Regards, Jane
-----------------------------------------------------------------------------------
nv_daemon_check.sh
#!/bin/sh
echo "NetView daemons" > /usr/OV/conf/skills/temp_ov
/usr/OV/bin/ovstatus >> /usr/OV/conf/skills/temp_ov
# echo "Nways daemons" >> /usr/OV/conf/skills/temp_ov
# /usr/CML/bin/cmlstatus >> /usr/OV/conf/skills/temp_ov
cat /usr/OV/conf/skills/temp_ov
exit 0
nv_daemon_fail.sh
#!/bin/sh
echo "NetView daemons" > /usr/OV/conf/skills/temp_ov
/usr/OV/bin/ovstatus >> /usr/OV/conf/skills/temp_ov
#echo "Nways daemons" >> /usr/OV/conf/skills/temp_ov
#/usr/CML/bin/cmlstatus >> /usr/OV/conf/skills/temp_ov
BAD=`grep NOT /usr/OV/conf/skills/temp_ov | wc -l`
if [$BAD -gt 0 ]
then /usr/OV/bin/ovxbeep "$BAD daemon(s) are down - run the
Check_Network_Daemons job" &
fi
exit 0
--
Tivoli Certified Consultant
Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
Tel: +44 (0)1628 782565
Copyright (c) 1999 Jane Curry <jane.curry@skills-1st.co.uk>. All rights
reserved.
|