[mrtg] Re: 95th% line on the graph how???
Pete Templin
templin at urdirect.net
Sat Jan 27 10:11:55 MET 2001
On Fri, 26 Jan 2001, Ritch McGreevy wrote:
> Maybe I'm dense, but when I run the mrtg_archive it creates the directories
> as it's supposed to but it never copies the log over to the archive
> directory. I've put it in my cron to update every 5 minutes as mrtg does,
> but the "archive" directories are empty. When I run mrtg95 based on the
> original location of the log files it gives me proper values. when ran on
> the "archives" as expected it gives 0 for all results.
Here's something that may prove helpful. This script was very quick and
very dirty, but since it's been working beautifully for my application I
hadn't gone back to it in a long time.
---------- Forwarded message ----------
Date: Thu, 31 Aug 2000 10:10:08 -0500 (CDT)
From: Pete Templin <templin at urdirect.net>
Subject: RE: 95th percentile for MRTG blues
I took a look, and I made some bad assumptions when I wrote the script.
I'm expecting one directory in "$path", not just a file name. You'll want
to edit this part of the code:
(@path) = split(/\//,$path);
unless (-d "$archive_dir/$path[0]") {
system("mkdir $archive_dir/$path[0]");
}
unless (-f "$archive_dir/$path") {
system("touch $archive_dir/$path");
}
to be:
(@path) = split(/\//,$path);
if (@path > 1) {
unless (-d "$archive_dir/$path[0]") {
system("mkdir $archive_dir/$path[0]");
}
}
unless (-f "$archive_dir/$path") {
system("touch $archive_dir/$path");
}
or remove that first "unless..." section altogether.
Pete
--
Peter J. Templin, Jr., CCNA, CCDA
VP Networking
On-Line Internet Services - URDirect.net
A division of Global On-Line Computers
5606 Randolph Blvd templin at urdirect.net
San Antonio, TX 78233 (210)692-9911
--
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