[mrtg] SV: Re: inserting log in database

Christian Rasmussen chr at egebjerg.com
Thu Oct 31 22:54:18 MET 2002


Hi Paul,


I just looked at your script again, I know see that the meaning of your
script must be to read the MRTG logfiles and insert the data in mysql.

What I would have liked to do was to insert some lines in the MRTG perl
script to grab the data from there. No one has any idea in what area of the
code the log is written??

If I instead read the logfiles I will write it in PHP, but your shell script
is still very interesting :)

Best regards,
Christian Rasmussen


> > Where do you get the data in "%.0f,%.0f,%.0f,%.0f,%.0f,%.0f" from?
> 
> That's merely formatting for the numbers supplied in the printf line in
> the awk script.  "%.0f" means "a floating point number with zero decimal
> places".  Most awk implementations will also let you use a "%i" to
> indicate an integer, but that's doesn't work everywhere, and %f does.

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