[mrtg] Re: 95th% line on the graph how??? as in http://west-boot .mfnx.net/traffic/chi/chi-sjc.html

Ritch McGreevy rmcgreevy at gramtel.net
Fri Jan 26 22:08:15 MET 2001


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.  

I've included a copy of my achive_mrtg file 

-----mrtg_archive-------

#!/usr/bin/perl
#mrtg_archive

# Configurations
$mrtg_dir = "/home/mrtg/public_html/";
$archive_dir = "/home/mrtg/archive";
$conf = "/home/mrtg/mrtg_archive.conf";

# Read a config file if present.
if (-e $conf) {
    open(CONF,"$conf");
    while(<CONF>) {
        chomp;
        push(@elements,$_);
    }
}

# Take arguments from the command line if present.
@elements = @ARGV if (@ARGV);

# Fail if no arguments.
die "Need a list of parameters to monitor!\n" unless (@elements);

# Process each of the elements
for ($a=0; $a<=$#elements; $a++) {
    $count = undef;
    ($path,$comment) = split(/:/,$elements[$a]);
    (@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");
    }

    open(LOG,"$mrtg_dir/$path");
    open(COPY,">>$archive_dir/$path");
    while (<LOG>) {
        if ($count >= 3) {
            print COPY;
        }
        if ($count >= 598) {
            last;
        }
        $count++;
    }
}

Any suggestions?

-----Original Message-----
From: Mark Winter [mailto:markw at real.com]
Sent: Friday, January 26, 2001 2:22 PM
To: Ritch McGreevy
Subject: RE: [mrtg] 95th% line on the graph how??? as in
http://west-boot .mfnx.net/traffic/chi/chi-sjc.html


no I'm still using the old log file format.  The mrtg_archive.conf file
use the format:

logfilename.log:95th Percentile - Label

then the mrtg95.pl script goes through and parses the logfile and makes a
text file showing the 95 percentile numbers for each month.

There might be something better out there but I got this one working
relatively easily so I just stuck with it.

On Fri, 26 Jan 2001, Ritch McGreevy wrote:

> Mark,
> Are you using rrdtool for these scripts?
> Also what are you putting in the mrtg_archive.conf?
> Thanks for all your help.
>
> Ritch McGreevy
> rmcgreevy at gramtel.net
>
> -----Original Message-----
> From: Mark Winter [mailto:markw at real.com]
> Sent: Thursday, January 25, 2001 6:14 PM
> To: Mark F. Vickers
> Cc: Michael Rose Jr.; 'rmcgreevy at gramtel.net'
> Subject: Re: [mrtg] 95th% line on the graph how??? as in
> http://west-boot.mfnx.net/traffic/chi/chi-sjc.html
>
>
> I just dug through the mrtg mailing list and this seemed like a relatively
> straight forward set of scripts so that's what I used.
>
> http://www.ee.ethz.ch/~slist/mrtg/msg00273.html
>
> -Mark
>
> On Thu, 25 Jan 2001, Mark F. Vickers wrote:
>
> > Didn't get it on the graph but the guy that works for me did find a
> > utility that parses the mrtg logs and outputs the 95% numbers for the
> > month.
> >
> > Winter what was the name of the perl script you found?
> >
> > -Vickers
> >
> > "Michael Rose Jr." wrote:
> > >
> > > Ritch,
> > > Did you or Mark ever figure out how a way to create the 95th
percentile
> > > line, similar to the one shown on the URL below?
> > > Thanks,
> > >
> > > Mark, good afternoon, did you or anyone else ever figure out how to do
> this?
> > >
> > > I am having to figure a way of doing it and this is exactly what I
need.
> > >
> > > Thanks
> > >
> > > Ritch McGreevy
> > > Network Engineer
> > >
> > > GramTel Communications, Inc.
> > > Intelligent Infrastructure [Secure and Simple]
> > > 316 E Monroe St.
> > > South Bend, Indiana USA 46601
> > > P 219.472.4726
> > > F 219.472.0904
> > > www.gramtel.net
> > >
> > > -----Original Message-----
> > > From: Mark F. Vickers [mailto:mvickers at real.com
> <mailto:mvickers at real.com> ]
> > > Sent: Tuesday, November 21, 2000 4:00 PM
> > > To: mrtg at list.ee.ethz.ch; markw at real.com
> > > Subject: [mrtg] 95th% line on the graph how??? as in
> > > http://west-boot.mfnx.net/traffic/chi/chi-sjc.html
> > > <http://west-boot.mfnx.net/traffic/chi/chi-sjc.html>
> > >
> > > This graph appears to have both a 95th percentile number and line, any
> > > idea how this is done???
> > > http://west-boot.mfnx.net/traffic/chi/chi-sjc.html
> > > <http://west-boot.mfnx.net/traffic/chi/chi-sjc.html>
> > > --
> > > Mark Vickers, RealNetworks Inc.  Desk: (206) 674-2391  Fax:
> > > (206)674-3588
> > >
> > >
> > > Michael Rose Jr.
> > > Network Operations Manager
> > > TEGRIS Corporation <http://www.tegris.com/>
> > > mailto:mike at tegris.com <mailto:mike at tegris.com>
> > > Accessline: 206-718-7673
> >
> > --
> > Mark Vickers, RealNetworks Inc.  Desk: (206) 674-2391  Fax:
> > (206)674-3588
> >
>

--
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