On Mon, 2003-01-06 at 09:03, Cliff Cliff wrote:
> Another is how can I write program in Linux (using red hat v7.3) for MRTG.
I
> want to get the max point in each day (use 5 min as the reference point) of
> MRTG for billing to our customer. How can I do as I am not familiar with
the
> MRTG programming.....

Do you know perl?  It'd be pretty easy to write a little snmp script to
query the router and log it to a text file or mysql or something.  Cron
it for every 5 minutes.  Then write another script to analyze the
collected data, i.e. "select max(col) from table" in sql, or parse your
log file out.

Don't try to "program" mrtg.  If you want to use the stuff MRTG uses to
store the data, you should look at RRDTool.  That's at
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/ along with a bunch
of documentation on how to integrate it.

Also, check out cacti (http://www.raxnet.net/products/cacti/) for lots
of examples of collection scripts, and in general, for a much better
MRTG replacement.  I've run hundreds and hundreds of routers in cacti,
and it works well enough on a fast machine.  

All of this stuff is free-ish (gpl i think).

 -sd




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=60446&t=60423
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to