Utility configmaker-type scripts Copyright 2001, Derek Chen-Becker INTRO Configmaker is nice, but sometimes it helps to have a little more information at your fingertips. I was doing a lot of work monitoring switches and routers in-house and I wanted to be able to automatically update mrtg configs and generate html index pages for the devices with extra information like port names, speeds, etc. These three scripts are my attempt at a spiffier configmaker. The two TCL scripts query a device and automagically generate an HTML Index page with interface names and information along with daily, weekly and monthly index pages for quick reference across a set of interfaces. The perl script is able to examine a directory of MRTG logfiles and determine the top N graphs in terms of collected values. I use it to display the top 5 interfaces on our switch or the top 2 T1s on our internet router (multihomed). DETAILS Here is a better description of each script: catalyst.tcl: This script is written for Catalyst 4,5,6xxx series switches from Cisco. I wrote it for switches with version 4 code on them, so I don't know if it works for later versions. If it doesn't work, please let me know. In order to generate the correct output, you need to have the CISCO-SMI, CISCO-STACK_MIB and IF-MIB.txt mibs installed (or equivalent). If you don't already have them, they're in the mibs/ subdirectory. ios.tcl: A modified version of the script that uses only IF-MIB functionality. I worked on this because we got a Foundry switch that is IOS-based. It also works for IOS-based routers, and should work for any device with IF-MIB capability. You only need IF-MIB.txt installed (or equivalent) for this to work. topNmrtg.pl: A script I recently wrote to figure out which interfaces were using the most bandwidth. Basically, it scans a provided directory for MRTG log files and calculates the top N graphs. It then generates an index HTML file that points to the MRTG-generated html files. I tried to make it flexible, but I'm sure there's room for improvement. This script doesn't use SNMP, so you don't need any mibs. INSTALLATION Should be pretty simple. If you've added new mibs to Tnm before, the procedure is the same for the CISCO-SMI, CISCO-STACK and IF-MIB mibs. If you've never done this before, here are some step-by-step instructions: 1. cd to the mrtg-util/mibs/ subdirectory 2. Copy CISCO-SMI.my, CISCO-STACK-MIB.my and IF-MIB.txt to your mibs directory under Tnm. On unix, this is usually /usr/lib/tnm2.1.10/mibs. I don't know what it is on Windows. If you know, please contact me so I can update this document. 3. Copy init.tcl to /usr/lib/tnm/2.1.10/site