Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 1998 12:06:20 -0600 (CST)
From:      Jeremy Shaffner <jer@jorsm.com>
To:        Gary Palmer <gpalmer@FreeBSD.ORG>
Cc:        ryanm <ryanm@accn.org>, freebsd-isp@FreeBSD.ORG
Subject:   Re: Qpopper + Sendmail graphing Utility 
Message-ID:  <Pine.BSF.3.95q.981217120417.29473D-100000@mercury.jorsm.com>
In-Reply-To: <9369.913237166@gjp.erols.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Dec 1998, Gary Palmer wrote:

> ryanm wrote in message ID
> <366EC5D9.1F762F27@accn.org>:
> > Does anyone know of any tools that take popper and sendmail
> > logfiles, parse them and generate .html output?? I am looking
> > to put some stat's up on our website so I thought I would
> > see if there were any tools already available to do this.
> > If you have any info you can pass on I would appreciate it.
> 
> There is a thing in the MRTG distribution to allow you to feed the
> output of the mailstats command into MRTG for graphing. It looks
> pretty raw...
> 
> No idea about qpopper ... we graph some qpopper stuff, but thats more
> a feature of our network monitoring software than it is anything else.
> 

Haven't looked at this yet, but it might help.

----

>From john@arnie.jfive.com Thu Dec 17 12:04:00 1998
Date: Fri, 11 Dec 1998 11:46:33 -0600 (CST)
From: John Heyer <john@arnie.jfive.com>
To: ryanm@accn.org
Cc: krl@rtmx.com, dima@stv.ee, baroti@icmct.uvt.ro, jer@jorsm.com
Subject: Popper Traffic Script


This is all I have so far - it's nothing much and unfortunately doesn't
graph or sort, but does give you the accesses based on username and has
decent runtime. I am looking to create one that graphs and sorts, but I
really have no idea how to do that in Perl, so it will be a C or C++
program coming in late Decemeber.  Since I'm sharing it with others, I
can't develop it on company time.  

--
"Mr. Spock, your mind is incedibly logical and analytical!"

"Thank you."


#!/usr/bin/perl 

# Popper stats by Username
# Designed to spot high frequencies of mail access through POP server

# by John Heyer = jfive@jfive.com 

print "Content-type: text/html\n\n";
print "<HTML><HEAD></HEAD>\n";
print "<BODY BGCOLOR=FFFFFF>\n";

$logfile = "/var/log/messages";

@entries = `grep \'popper\' $logfile | grep -i stats | awk -F\: '{print \$5}'`;

$i, $biggest = 0;

foreach $entry (@entries) {
        ($null,$username,$stats) = split(/ /,$entry);
        if(!$times{$username}) {
                # New access for today
                @accesses[$i] = "$username";
                $times{$username} = 1;
        } else {
                # Another access
                $times{$username} = $times{$username} + 1;
        }
        $i++;
}

print "<H2>Popper Stats by username</H2>\n";
print "<TABLE WIDTH=100%>\n";
foreach $username (@accesses) {
        if ($username) {
                print "<TR><TD>$username</TD>";
                print "<TD>$times{$username}</TD></TR>\n";
        }               
}
print "</TABLE>\n</BODY>\n</HTML>\n";



-===================================================================-
Jeremy Shaffner					JORSM Internet
Senior Technical Support 		  Northwest Indiana's Premium
jer@jorsm.com				   Internet Service Provider	
support@jorsm.com			     http://www.jorsm.com	
-===================================================================-


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.981217120417.29473D-100000>