[mrtg] Windows 2K performance monitor
Jason M. Kuhlman
jkuhlman at oglecounty.org
Thu May 1 18:19:00 MEST 2003
Sorry for the length of this post. I am trying another avenue to monitor a
Win2K box. I have followed the instructions at http://www.wn.com.au/psimmo/
I want to monitor 3 counters. The problem I am running into is I get the
following error:
ERROR: Skipping webupdates because rateup did not return anything sensible.
I saw a reference to how to modify the perl script, but I don't know Perl
and how to modify it to fit the cfg file below. Can anyone help me?
This is my cfg file.
Workdir: C:\mrtgdata
Title[Server-memory]:\\Server\Memory\Available MBytes
Pagetop[Server-memory]: <H1>\\Server\Memory\Available MBytes</H1>
MaxBytes[Server-memory]: 10000
Options[Server-memory]: gauge, nopercent,growright
Target[Server-memory]: `perl getlog.pl C:\perflogs\MRTG_mapserver.csv
"\\GISMAPSERVER\Memory\Available MBytes"`
YLegend[Server-memory]: " "
ShortLegend[Server-memory]:
LegendO[Server-memory]:
LegendI[Server-memory]:
Legend2[Server-memory]:
Legend1[Server-memory]:
Title[Server-bytestotal]:\\Server\Network Interface\Bytes Total/sec
Pagetop[Server-bytestotal]: <H1>\\Server\Network Interface\Bytes
Total/sec</H1>
MaxBytes[Server-bytestotal]: 100000
Options[Server-bytestotal]: gauge, nopercent,growright
Target[Server-bytestotal]: `perl getlog.pl C:\perflogs\MRTG_mapserver.csv
"\\GISMAPSERVER\Network Interface(3Com EtherLink PCI)\Bytes Total/sec"`
YLegend[Server-bytestotal]: " "
ShortLegend[Server-bytestotal]:
LegendO[Server-bytestotal]:
LegendI[Server-bytestotal]:
Legend2[Server-bytestotal]:
Legend1[Server-bytestotal]:
Title[Server-processor]:\\Server\Processor(_Total)\% Processor Time
Pagetop[Server-processor]: <H1>\\Server\Processor(_Total)\% Processor
Time</H1>
MaxBytes[Server-processor]: 100
Options[Server-processor]: gauge, nopercent,growright
Target[Server-processor]: `perl getlog.pl C:\perflogs\MRTG_mapserver.csv
""\\GISMAPSERVER\Processor(_Total)\% Processor Time"`
YLegend[Server-processor]: " "
ShortLegend[Server-processor]:
LegendO[Server-processor]:
LegendI[Server-processor]:
Legend2[Server-processor]:
Legend1[Server-processor]:
Getlog.pl
# getlog.pl
#
# Author: Paul Simmonson
#
# Input: filename of Windows 2000 Performance monitor log file (must be CSV
format)
# Name of log item to extract
# eg. perl getlog-fixed.pl c:\perflogs\K6.csv "\\K6\LogicalDisk(C:)\% Disk
Time"
# Output: mrtg data format
#
$STUFF=@ARGV[0];
open STUFF or die "Cannot open $STUFF for read :$!";
@entries = <STUFF>;
@details=split /,/, @entries[0]; #get the first line of the log file
@lastline=split /,/, @entries[$#entries]; #get last line of log file
#find the entry that matches $ARGV[1]
$index=-1;
for $entry (@details) {
$index++;
$entry=~ tr/"//d;
chomp ($entry);
$last=$entry;
last if $entry eq $ARGV[1];
}
if ($last eq $ARGV[1]) {
$data=@lastline[$index];
$data=~ tr/"//d;
$data = int($data+0.5);
} else {
$data = 0;
}
print "0\n";
print "$data\n";
print "0\n";
print "0\n";
Jason M. Kuhlman
Ogle County GIS Committee
1989 S. IL Route 2
Oregon, IL 61061
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list