|
|
|
Device
|
|
Generic Management Chassis-Serial-Num Find-IF-Problems Find-QOS-Drops Find-Span-Ports Inv-Image Porter-Report Reset-Device Seq-Reboot Show-IF-Errors Twiddle-Interface WAN Circuit Alarm WAN Circuit Details |
Generic ManagementThe ScriptsThese PERL scripts help us manage our flock of switches & routers. They rely on IETF-standardized MIB variables or on enterprise MIB variables drawn from a variety of manufacturers. Chassis-Serial-Num takes a list of devices as arguments and produces five column report consisting of the device name, the manufacturer, the hardware type, the chassis' serial number, and an owner (internally defined). Find-IF-Problems takes a list of devices as arguments and lists the ports on each device which have seen errored packets or have dropped packets due to resource constraints. Find-QOS-Drops takes a list of devices as arguments and lists the ports on each device which have dropped QoS-flagged frames. Find-Span-Ports takes a list of devices as arguments and describes the ports on each device which are in 'span' or 'mirror' mode. Inv-Image takes a list of devices as arguments and produces a three column report consisting of the device name, the hardware type, and the currently running image name. We run the Porter-Report from cron every night. It searches the hosts table for any device with a name ending in "-esx", assumes that this is a switch, and then asks that device for ifInOctets on every interface it can find. It stores the result in an ASCII database, watches for changes, and produces a detailed text report as well as a summary report. If a given interface's ifInOctets count has not incremented for 30 days, then that port appears in the report. We then know that this port hasn't seen activity for at least 30 days ... is not attached to an active device ... and is available for use elsewhere. If someone needs an ethernet connection off that switch, and if all the ports on the switch are physically connected to jacks, we yank the connection to one of these "idle" ports in order to make room for the new device. Ron Hood wrote the original version of this script and maintained it until recently -- this original version supports hubs. Reset-Device takes a list of devices as arguments and reboots them. Seq-Reboot takes a list of devices as argumen ts and reboots them in turn, waiting for each one t o return to life before continuing to the next and bailing if a device does not return to life. Show-IF-Errors takes a list of switches as arguments and displays which switches, and which interfaces, are reporting FCS and/or late collisions errors. This script stands by itself -- it doesn't require the Netops modules. Twiddle-Interface takes an interface designator as an argument plus various action parameters and then fiddles with that interface's ifOperStatus: enabling and/or disabling it in various ways. WAN Circuit Alarm takes a list of devices as arguments and reports on the status of administratively enabled WAN ports, notifying operators by e-mail if any seem troubled. WAN Circuit Details takes a list of devices as arguments and reports on the configuration of administratively enabled WAN ports. |
|
Prepared by: Stuart Kendrick Last modified: 21-April-2008 |