[mrtg] Mailstats

Vinay Bharel vinay at grepmaster.com
Tue Aug 22 18:23:21 MEST 2000


I am trying to graph my mail traffic using the mailstats program.  Here is
a little shell script I came up with 


UPTIME=`uptime | awk '{print $3,$4,$5}' | cut -b1-15`
[ -f $STATFILE ] || exit 0
$MAILSTATS -f $STATFILE | $AWK '$NF == MAILER {printf "%d\n%d\n", $2, $4}' MAILER=$mailer
echo $UPTIME "hours"
uname -a

I basically used the code in the mrtg-misc-probe-0.1.2 package by Peter
W. Ose .

My problem is that I don't see any data in my graphs.

Here is the output the script produces:

12:17pm root at endor (/opt/mrtg)# ./mailstats.sh 
127 days, 19:11 hours
Linux endor 2.2.14 #1 Tue Apr 4 20:51:38 EDT 2000 i686 unknown

Here is my cfg file:

WorkDir: /var/www/htdocs/mrtg/mailstats
Target[mailstats]: `/opt/mrtg/mailstats.sh`
Title[mailstats]: Sendmail Statistics
MaxBytes[mailstats]: 100000
Options[mailstats]: nopercent
PageTop[mailstats]:<H1>Sendmail Statistics</H1>
WithPeak[mailstats]: ymwd
YLegend[mailstats]: No. of messages
ShortLegend[mailstats]: messages / 5 min
LegendI[mailstats]: &nbsp;Incoming:
LegendO[mailstats]: &nbsp;Outgoing:
Legend1[mailstats]: Incoming Messages
Legend2[mailstats]: Outgoing Messages
Legend3[mailstats]: Peak Incoming Messages
Legend4[mailstats]: Peak Outgoing Messages

You can look at the html and the log file at
http://www.grepmaster.com/mrtg/mailstats .

What am I doing wrong?

 Vinay Bharel | vinay at i.am.the.grepmaster.com | http://www.grepmaster.com
    Besides, I think Slackware sounds better than 'Microsoft,' don't you?
                                                    -- Patrick Volkerding

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