[mrtg] A Scaled or Unscaled question.
viana.gomes at bnpgroup.com
viana.gomes at bnpgroup.com
Thu Mar 9 14:06:47 MET 2000
Hi ,
I've build a small script to get Disk information for my NT Servers , this is
done by the Rules of MRTG . My script returns in MegaBytes (integer values) the
used and Free
MBytes. I use a tool from the NT Resource Kit to get this values.
Here it is my script:
require "c:\\mrtg\\run\\cgi-lib.pl";
use SNMP_util;
&ReadParse(*in);
my $value = $in{'val'};
my $diskindex = $in{'disk'};
chomp $diskindex;
my $uptime = up();
chomp $uptime;
@diskinfo = `srvinfo -od $in{'val'}`;
for (my $i = 0 ; $i <= $#diskinfo; $i++) {
my ( $disk , $type , $maxbytes , $used , $free )= split( /,/, $diskinfo[$i]);
chomp $used;
chomp $free;
chomp $disk;
if ( $disk eq $diskindex ) {
print "$used\n";
print "$free\n";
print "$uptime\n";
print "$hostname\n";
}
else {
}
}
sub up {
my ($uptime);
$hostname = substr $in{'val'},2;
chomp $hostname;
$hostname = lc $hostname;
($uptime) = snmpget ("mycomm\@$hostname", '.1.3.6.1.2.1.1.3.0');
$uptime
}
Parts of My config file :
#*********************************************************************
# MRTG Configuration file.
# Check the Disk Space for all Our NT Server and Critical Workstations.
#*********************************************************************
#.....................................................................
# General options for all equipments and statistics.
#.....................................................................
WorkDir: d:\InetPub\wwwroot\Mrtg\
ThreshDir: c:\temp\
Refresh: 300
Interval: 30
Unscaled[_]: dwym
WithPeak[_]:wmy
XSize[_]:600
YSize[_]:300
kMG[_]: M
kilo[_]: 1024
YLegend[_]: Disk Capacity in MBytes
Legend1[_]: Used MBytes
Legend2[_]: Free MBytes
Legend3[_]: Peak Used
Legend4[_]: Peak Free
LegendI[_]: MBytes Used:
LegendO[_]: MBytes Free:
ShortLegend[_]: M
Options[_]: growright,integer,gauge
Background[_]:#ffffffff
bla,bla,bla...
**********************
# F: Disk
Title[MYSERVF]: Disk usage for Disk F: in DBSERVER1 NT Server.
bla,bla,bla...
MaxBytes[MYSERVF]: 15318
Target[MYSERVF]: `perl c:\mrtg\run\disk.pl val=\\MYSERV disk=F$`
#**************************************************************************************************************************************
Ok here follows my problem :
I get the graphics for this disk with the following legend :
Max MBytes Used: 3877 (25.3%) Average MBytes
Used: 3873 (25.3%)
Current MBytes Used:
3877 (25.3%)
Max MBytes Free: 11441 (74.7%) Average MBytes
Free: 11430 (74.6%)
Current MBytes Free:
11441 (74.7%)
These are the values I get , and they are correct , but the problem is with the
graphs I get the Scale goes from "0.0 M" up to "16.0 M" ???
Is this normal ? Can this be a scale problem ?
I've checked for all my disks and I see the same problem for a disk with
"MaxBytes" defined has 6854 (MBytes).
In this case my legend is :
Max MBytes Used: 6698 (97.7%) Average MBytes
Used: 6631 (96.7%)
Current MBytes Used:
6696 (97.7%)
Max MBytes Free: 885 (12.9%) Average MBytes
Free: 215 (3.1%)
Current MBytes Free:
158 (2.3%)
And my graph is scaled between 0.0 M and 7.2 M ?
Anyone has a tip or answer to this issue ?
Best regards to all and thanks in advance for your help.
Viana Gomes
BNP Portugal
Lisboa
_____________________________________________________________________________________________________________________________________
L integrite de ce message n'etant pas assuree sur Internet, les societes du groupe BNP Paribas ne peuvent etre tenues responsables de son contenu.
Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur.
----------------------------------------------------------------------------------
The integrity of this message cannot be guaranteed on the Internet, companies of the BNP Paribas group can not therefore be considered responsible for the contents.
If you are not the intended recipient of this message, then please delete it and notify the sender.
_____________________________________________________________________________________________________________________________________
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list