Thanks for the info I will give it a shot
Matthew Johnson
Entertainment Partners
Backup Administrator
Work - 818-955-6357
Cell - 805-469-8867
-----Original Message-----
From: Mark.Donaldson at cexp.com [mailto:Mark.Donaldson at cexp.com]
Sent: Friday, August 25, 2006 9:59 AM
To: Matthew Johnson; veritas-bu at mailman.eng.auburn.edu
Subject: RE: [Veritas-bu] Monitoring Tape drives
Here's a variant of my old drive monitor script. Just run it on your
master server (only) via cron as often as you want to sample. Perhaps
every 15 min.
It'll actively lookup your media servers, check them, and report drives
down on that media server. It keeps a history file so it'll only report
a drive once unless it's cleared then reoccurs. Change the MAILADDR
variable for your environment.
$>cat drivemon
#!/bin/ksh
PATH=$PATH:/usr/openv/volmgr/bin:/usr/openv/netbackup/bin/admincmd
MAILADDR=Netbackup.Support
# run-to-run history
HIST=/tmp/`basename $0`.hist
[ ! -f $HIST ] && touch $HIST
# temp file to gather vmoprcmd output
TMP=/tmp/`basename $0`.tmp
[ -f $TMP ] && rm -f $TMP
#Log management
LOG=/usr/openv/netbackup/logs/`basename $0`.log
[ -f ${LOG}.5 ] && mv ${LOG}.5 ${LOG}.6
[ -f ${LOG}.4 ] && mv ${LOG}.4 ${LOG}.5
[ -f ${LOG}.3 ] && mv ${LOG}.3 ${LOG}.4
[ -f ${LOG}.2 ] && mv ${LOG}.2 ${LOG}.3
[ -f ${LOG}.1 ] && mv ${LOG}.1 ${LOG}.2
[ -f ${LOG}.0 ] && mv ${LOG}.0 ${LOG}.1
[ -f $LOG ] && mv $LOG ${LOG}.0
exec >$LOG 2>&1
echo "## Started: `date`"
for m in `bpstulist|awk '$5>=0 && $7>0 {print $3}'|sort|uniq`
do
echo "## Gathering $m."
vmoprcmd -h $m -xd ds|awk '$4~/DOWN/ {print "'$m' "$2}'|tee -a $TMP
done
while read mserver drive
do
if [ `grep -c "^${mserver} ${drive}$" $HIST` -eq 0 ]
then
echo "## Drive $drive down on $mserver: Newly discovered."
echo "Drive $drive on $mserver is down: `date`." | \
mailx -s "NB Wrn: $mserver:$drive down" $MAILADDR
else
#Just debug info for logfile
echo "## Drive $drive down on $mserver: Already Reported."
fi
done <$TMP
mv -f $TMP $HIST
echo "## Done: `date`"
exit
________________________________
From: veritas-bu-bounces at mailman.eng.auburn.edu
[mailto:veritas-bu-bounces at mailman.eng.auburn.edu] On Behalf Of Matthew
Johnson
Sent: Friday, August 25, 2006 8:55 AM
To: veritas-bu at mailman.eng.auburn.edu
Subject: [Veritas-bu] Monitoring Tape drives
Hello all,
I was wondering if anyone out there recommends monitoring software or
has a script on there master/media server that monitors the tape drives.
We are in the process of getting something but it is going to take time.
I do not have the $$'s to purchase something. I would like to get an
e-mail when a drive goes down.
Master Server Sun E450 controls the robot l700
Media Server MS Windows 2003 server controls 4 LTO2 tape drives
Media server Linux controls 6 9840B tape drives
Any ideas would be much appreciated. TIA
Matthew Johnson
Entertainment Partners
Backup Administrator
Work - 818-955-6357
Cell - 805-469-8867
________________________________
Disclaimer - August 25, 2006
This email and any attachments are confidential and intended solely for
veritas-bu at mailman.eng.auburn.edu. If you are not a named addressee you
are prohibited from reviewing, printing, disseminating, distributing,
copying or altering this email or any part of it. If you have received
this communication in error, please notify the sender of the error
immediately, do not read or use the communication in any manner, destroy
all copies, and delete it from your system if the communication was sent
via email. Warning: Although Entertainment Partners has taken reasonable
precautions to ensure no viruses are present in this email, the
recipient is responsible for checking for and deleting viruses.
Entertainment Partners does not accept responsibility for any loss or
damage arising from the use of this email or attachments.
Disclaimer - August 25, 2006
This email and any attachments are confidential and intended solely for
Mark.Donaldson at cexp.com,veritas-bu at mailman.eng.auburn.edu. If you are not
a named addressee you are prohibited from reviewing, printing, disseminating,
distributing, copying or altering this email or any part of it. If you have
received this communication in error, please notify the sender of the error
immediately, do not read or use the communication in any manner, destroy all
copies, and delete it from your system if the communication was sent via email.
Warning: Although Entertainment Partners has taken reasonable precautions to
ensure no viruses are present in this email, the recipient is responsible for
checking for and deleting viruses. Entertainment Partners does not accept
responsibility for any loss or damage arising from the use of this email or
attachments.
|