[mrtg] Re: A couple of newbie questions

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Thu Dec 9 18:33:57 MET 1999


Jeff  Warnica wrote:
> 
> 
> The problem Im having is with graphing the number of portmaster ports in
> use. Im using the collection of scripts from
> http://thingy.usu.edu/network-stats/portmaster.html (slightly modified the
> text it outputs so it makes sense on our pm2er30). I have put these in there
> own .cfg and they run fine from the command line, but dont run from cron.
> (or dont work...)
> 
Most of the times this is due to different PATH settings.
Always use full paths for your commands when run from cron will help.

> Also, not realy a mrtg question, but is there a package that will collect
> data in a format like mrtg but with continously growing logs? Or a mrtg
> switch to make a continously growing log?
> 
Not that I know of but you could write your own:
MRTG will have about 300 lines worth of 5-minute samples.  You could
get these lines every midnight and merge them with your own logfile.

Something like:
(mylog is the log you want to keep; not an mrtg log)

   mv mylog mylog.old
   head -300 mrtg.log | tail +4 > mylog.new
   cat mylog.new mylog.old | sort -u > mylog
   rm mylog.old mylog.new

Add some checking, redundancy, whatever.

Regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

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