Hello Robert
Here is the pure perl (activestate) script that we use on windows machines
If you're running SSO only run the script on one of the media servers.
Regards
Michael
drivekap.pl
#!/usr/bin/perl
($sec,$min,$hour,$day,$mon,$year)=localtime();
$year=$year+1900;
$mon=$mon+1;
$mon=substr("0$mon",-2,2);
$day=substr("0$day",-2,2);
$hour=substr("0$hour",-2,2);
$min=substr("0$min",-2,2);
$htime="$hour:$min";
$filename="/tsm/logs/drivekap.$year$mon$day";
@DRIVES=`/VERITAS/Volmgr/bin/vmoprcmd -d ds`;
shift @DRIVES;
shift @DRIVES;
shift @DRIVES;
shift @DRIVES;
@INUSE=(grep /Yes/, @DRIVES);
@DOWN=(grep /DOWN/, @DRIVES);
$DRIVES=scalar(@DRIVES);
$INUSE=scalar(@INUSE);
$DOWN=scalar(@DOWN);
$PCTUSE=100*$INUSE/$DRIVES;
$PCTDWN=100*$DOWN/$DRIVES;
open (OUTF, ">>$filename");
print OUTF
$htime," ",$DRIVES," ",$INUSE," ",$DOWN," ",$PCTUSE," ",$PCTDWN,"\n";
close (OUTF);
--
Cybercity Webhosting (http://www.cybercity.dk)
|