Toptalker scripts

I have two scripts. One is for the older version of MRTG that has Rateup as it's backend. The other is for RRDTool.

MRTG/Rateup Script

Download

This script reads all the .html files in a specific directory and grabs the following:

It then sorts them based on whatever value you want. Right now it just does descending (highest to lowest) percent utilization, but I'm thinking about doing ascending (lowest to highest) and also based on units. The only qualifier for running this is you need to make sure that in your title, somewhere after the name of the router, there is at least an open parenthesis - "(" and a close parenthesis - ")". The target name extraction is based solely on this. Something like This router () will work fine. Something like This router (ATM Serial 3/0 link) will show up as just "This router". Something like (This router) will be blank. Try not to do that...

Below is a table that was created by the toptalker script. The names have been changed to protect the innocent:

Rank Router Name % Util Interface link
1 Border router 18.2% 192.168.1.3.2
2 Floor 2 router 18.0% 192.168.1.7.2
3 Main building router 17.3% 192.168.1.4.2
4 Intermediate router 15.1% 192.168.1.2.2
5 Packing 15.1% 192.168.1.6.2
6 Shipping 13.2% 192.168.1.10.2
7 Receiving 12.1% 192.168.1.9.2
8 Trunk 11.7% 192.168.1.5.2
9 ATM 11.1% 192.168.1.1.2
10 Edge 10.9% 192.168.1.8.2

What the script did is went through all .html files in the directory (there were 40 or so) and gave me back the top ten. It reads in all the values on the web page like so: It's in the program that way. You'll just have to believe me until you download it and look at the code. You'll have to look at the code and modify it a bit anyway, since you may want to rank on Yearly Max In, and the default is Daily Max In. You'll want to change it. If you want to modify the code and send patches to me to make it better, please do. I'll check out the proposed change and let you know if I incorporate it or not. Please find me e-mail address elsewhere in the site.


RRDTool Script

Download

This script is totally different that the rateup script. Since MRTG does not do automatic graphing, hence, no html pages, it's impossible to do the same kind of thing. This caused me to team up with Daniel McDonald to assist with writing this script. The script only ranks all links in a single config file (I'll explain in a bit) via either through browser or batch mode. It works similar to 14all in its resolution. As a matter of fact, I snagged the graphparams hash right from 14all. That really taught me how resolution works. I'm still not 100% clear on it, but at least now I can graph the last 12 hours with a 5 minute resolution and understand how and why it's done. I'll have plenty of examples on graphing when I get time.
If you really can't wait, check out David Sawyer's site for a user's perspective on the configuration and the script.

Hosting by WebRing.
Navigation by WebRing.