Hi Bob
Yes, the graphs are drives in use and drives down over time, we are running
with every 15 minutes.
Actually the graphs include backups, restores and duplications.
Here are the script that we run on the Netbackup Master Servers
#!/bin/ksh
VMPATH=/usr/openv/volmgr/bin
TMPFILE=/tmp/.vmoprcmd.$$.out
logdate=`date +'%Y%m%d'`
time=`date +'%T'`
$VMPATH/vmoprcmd -d ds | tail +5 > $TMPFILE
drives=`cat $TMPFILE | wc -l`
tape=`cat $TMPFILE | grep -i yes | wc -l`
down=`cat $TMPFILE | grep DOWN | wc -l`
echo "$tape/$drives*100" | bc -l | read pct
echo "$down/$drives*100" | bc -l | read downpct
printf "%s %2d %2d %2d %3.2f%1s %3.2f%1s\n" $time $drives $tape $down $pct
"%" $downpct "%" >>
/tsm/logs/drivekap.$logdate
rm -f $TMPFILE
This the converting script to make the ORCA input-files
#!/usr/bin/perl -w
($sec,$min,$hours,$day,$mon,$year)=localtime();
$year=$year+1900;
$mon=$mon+1;
$mon=substr("0$mon",-2,2);
$today=substr("0$day",-2,2);
$unixtime=time();
$unixtime=$unixtime-86400;
($sec,$min,$hours,$yday,$ymon,$yyear)=localtime($unixtime);
$yyear=$yyear+1900;
$ymon=$ymon+1;
$ymon=substr("0$ymon",-2,2);
$yesterday=substr("0$yday",-2,2);
print "today $year$mon$today\nyesterday $yyear$mon$yesterday\n";
@customers=`ls -1 /data/customers`;
foreach $customer (@customers)
{
chomp $customer;
@infiles
=("/data/customers/$customer/drivekap/drivekap.$year$mon$today","/data/customers/$customer/drivekap/drivekap.$yyear$ymon$yesterday");
foreach $filename (@infiles)
{
print $filename,"\n";
chomp $filename;
$date=substr($filename,-8,8);
if (!-e $filename) {next;}
open (IND,$filename) or die "cannot open $filename";
open (UD, ">/data/customers/$customer/drivekap/drivekap.orca.$date") or die
"cannot open outfile";
while ($line=<IND>)
{
($time,$tot,$drives,$down,$pctuse,$pctdown)=(0,0,0,0,0,0);
($time,$tot,$drives,$down,$pctuse,$pctdown)=split(" ",$line);
$pctuse=~s/%//;
$pctdown=~s/%//;
print UD toepoch($filename,$time),"\t",$time,"\t",$drives,"\t",$down,"
\t",$pctuse,"\t",$pctdown,"\n";
}
}
}
exit 0;
sub toepoch
{
use Time::Local;
my $file=$_[0];
my $time=$_[1];
$file=substr($file,-8,8);
$year=substr($file,0,4);
$mon=substr($file,4,2);
$day=substr($file,6,2);
($hours,$min)=split(":",$time);
$epoch=timelocal(0,$min,$hours,$day,($mon-1),$year);
return $epoch;
}
This the config-file to ORCA
state_file /usr/local/orca_state/drivekap_state
rrd_dir /data/rrd
html_dir /data/html/orca-html
html_page_header <a href="index.html">ORCA INDEX</a>
generate_hourly_plot 0
generate_daily_plot 1
generate_weekly_plot 1
generate_monthly_plot 1
generate_quarterly_plot 0
generate_yearly_plot 0
group drivekap {
find_files /data/customers/(.*)/drivekap/drivekap.orca.(\d{4}\d{2})\d{2}
column_description etime htime used_drives down_drives pctuse pctdown
date_source column_name etime
interval 900
}
plot {
title DRIVEKAP
source drivekap
data used_drives
data down_drives
line_type LINE2
line_type LINE2
}
plot {
title DRIVEKAP PROCENT
source drivekap
data pctuse
data pctdown
line_type LINE2
line_type LINE2
plot_max 100
rigid_min_max
}
Regards
Michael
"Bob Grabbe"
<GRABBEB To: <vbperry AT hotmail DOT com>,
@dominos.com> <veritas-bu-admin AT
mailman.eng.auburn DOT edu>, <mander47 AT sca.csc DOT com>
cc: <veritas-bu AT
mailman.eng.auburn DOT edu>
26-08-02 Subject: Re: [Veritas-bu] Drive
use metrics
14:00
Does your graph show the number of drives actually being used at the
time to either back up or restore ? If so, I would really like to get
the scripts to do this also.
Thanks
Bob Grabbe
Dominos Pizza LLC
734-930-3703
Fax 734-669-3703
grabbeb AT dominos DOT com
>>> <mander47 AT sca.csc DOT com> 8/25/02 4:37:48 AM >>>
Hi Perry
We are using ORCA to plot drive use in both SSO and non-SSO
environments.
What we plot is number of drives in use and number drives down.
If you wish, I will send you the scripts and config file.
attached is an example:
Regards
Michael
(See attached file: drivekapgraph.png)
"Perry Brown"
<vbperry To:
veritas-bu AT mailman.eng.auburn DOT edu
@hotmail.com> cc:
Sent by: Subject: [Veritas-bu]
Drive use metrics
veritas-bu-ad
min
23-08-02
23:52
I am trying to get some metrics on how often our DLT7000 tape drives
are
being used for backups, and dups. This would be on HPUX 11 and 11i
systems
in and SSO environment. I remember seeing someone post before a script
for
graphing this type of info in a Sun environment (though not in an SSO
environment). Does anyone have something like that for HPUX?
Thanks for any help.
Perry
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|