#!/usr/local/bin/perl # # Purpose: Check status of backup tape robots # # # Set variables $vmbin="/usr/openv/volmgr/bin"; $robot=`hostname | cut -d"." -f1`; # Check drive statuses $drive_status=`$vmbin/tpconfig -d | grep -i down`; # Mail notification to administrators if any drives are down if ($drive_status ne "") { open(MAIL, "|/bin/mailx -s \"$robot drives down\" prodops-backups\@uu.net"); print MAIL $drive_status; close(MAIL); } exit;