From owner-freebsd-isp Thu Dec 17 10:06:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA25321 for freebsd-isp-outgoing; Thu, 17 Dec 1998 10:06:32 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from mercury.jorsm.com (mercury.jorsm.com [207.112.128.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA25316; Thu, 17 Dec 1998 10:06:29 -0800 (PST) (envelope-from jer@jorsm.com) Received: from localhost (jer@localhost) by mercury.jorsm.com (8.8.7/8.8.7) with SMTP id MAA18350; Thu, 17 Dec 1998 12:06:21 -0600 (CST) Date: Thu, 17 Dec 1998 12:06:20 -0600 (CST) From: Jeremy Shaffner To: Gary Palmer cc: ryanm , freebsd-isp@FreeBSD.ORG Subject: Re: Qpopper + Sendmail graphing Utility In-Reply-To: <9369.913237166@gjp.erols.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 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 "\n"; print "\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 "

Popper Stats by username

\n"; print "\n"; foreach $username (@accesses) { if ($username) { print ""; print "\n"; } } print "
$username$times{$username}
\n\n\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