[mrtg] Re: script problem

Robin Kearney robin at riviera.org.uk
Thu Jul 22 15:36:30 MEST 1999


It ain`t complex :)

#!/bin/bash
mailstats -f/var/log/sendmail.st | grep "esmtp" | awk '{print $2"\n"$4"\n\n"}'


On Thu, Jul 22, 1999 at 08:22:41AM -0500, Glenn Forbes Fleming Larratt wrote:
> Is Bourne shell your normal shell environment? mrtg has always seemed
> pretty robust in this respect (kudos Tobi), but I've often found 
> weirdnesses in my own Perl scripts that were shell-dependent. Can
> you post mail-stats.sh?
> 
> 	-g
> 
> On Thu, 22 Jul 1999, Robin Kearney wrote:
> 
> > okay I tried:
> > a) running mrtg from the command line, nothing
> > b) redirecting stderr, creates and empty file :(
> > c) making sure everybody can run the script, yes they can.
> > 
> > This is what I have in mrtg.cfg:
> > 
> > Target[mail]: `/home/httpd/html/mrtg/mail-stats.sh 2>/tmp/mail-stats.err`
> > MaxBytes[mail]: 150
> > Options[mail]: gauge
> > Title[mail]: dent Sendmail Statistics
> > PageTop[mail]: dent Sendmail Statistics</H1>
> > WithPeak[mail]: dwmy
> > YLegend[mail]: No. of messages
> > ShortLegend[mail]: messages
> > LegendI[mail]: &nbsp;Incoming:
> > LegendO[mail]: &nbsp;Outgoing:
> > 
> > 
> > nothing strange or unusual.  the output is at http://dent.riviera.org.uk/mrtg/mail.html as you can see nothing :(
> > 
> > I thought it might just be a lack of mail, it is a new box, so I ran "while (true) ; do ; mail robin at funmail.co.uk < /etc/hosts ; sleep 10 ; done" from the cmd line, and watched the output from mail-stats rocket up as expected, but still nothing on the 
> graphs.
> > 
> > Anybody have any further ideas?
> > 
> > 
> > 
> 
> 
> --
> * To unsubscribe from the mrtg mailing list, send a message with the
>   subject: unsubscribe to mrtg-request at list.ee.ethz.ch
> * The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list