[mrtg] Re: Utilization graphs

alex at ergens.op.Het.Net alex at ergens.op.Het.Net
Wed May 17 00:23:14 MEST 2000


Paul C. Williamson wrote:

> Has anyone written a script to "discover" the busiest units over a per
> iod of time?  I have about 300 routers, all being graphed, and I'd lik
> e to have a summary page that shows me the 5 most busy and 5 least bus
> y routers.  I would think since all the graphs are derived from number
> s, I could run a perl script from a cron job at midnight giving me the
> information I need for the next business day.  I am running Red Hat 6.
> 1 and mrtg 2.8.11.  If anyone has advice, I'm all ears.

If there's enough processing power and time available:

1) calculate start and end times in seconds-since-epoch format
2) scan each log file; for each line with a time stamp inbetween the
   two values derived from step 1: add up the value found in column 2.
   Do the same with column 3.  Write the result to a file
3) sort the file (numeric mode)
4) "head -5" and "tail -5" provide the information you need

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 |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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



More information about the mrtg mailing list