Michael McNamara

 

Perl

I've coded in Perl for the better part of the past 10 years. Unfortunately very little time is ever spent cleaning up the code to make it more efficient, more modular, easier to read and/or follow (especially helpful while trying to debug). I've generally used Perl to pull data via SNMP and build reports. I have also used Perl to build web based applications using SNMP to configure different network switch settings (link speed, duplex, VLAN configuration, etc).

There are probably only four or five real Perl applications that I've built over those 10 years. All others have been adoptions of one of the original applications to suite a need or address a problem.

These scripts are NOT meant to be simply downloaded and installed into another system/server/network. They are provided as examples of what is possible to help others along the same path I've already traveled. If you are knowledgeable in Perl you could certainly take these scripts and adopt them to your own environment.

pingsweep.pl This is almost a poor mans network management application. It's purpose is to poll (ICMP) a list of devices on the network every 60 seconds. It records and alerts when any device goes down and it records and alerts when that device recovers. It shells out to fping to actually perform the ICMP pings.
   
reportdowntime.pl This script takes the data collected from the pingsweep.pl script and formulates a downtime report for all the devices being monitored. It will generate a monthly % of uptime so you can gauge your networks performance.
   
switchtftpbackup.pl This script will backup the switch configurations of the following switches to a TFTP server; Nortel ERS 8600, ERS 1648, ERS 5500, ES 470, ES 460 and ES 450. It will also backup a HP GbE2 switch blade along with a Motorola WS5100 (v3.x software) Wireless LAN Switch.
   
switchupgrade.pl This script will upgrade a switches boot and agent code. This script allows us to upgrade ~ 40 switches within a 30 minute period (impossible to accomplish if this was attempted manually).
   
portreport.pl This script gathers the list of available and busy Ethernet ports in the network. It provides a means for us to gauge which ports are actually being used over which are just patched (cross connected to a data jack).
   
symbolusers.pl This is a Web CGI script that is used to manage a Motorola (formerly Symbol) WS5100 v2.x Wireless LAN Switch. It just displays the wireless mobile units that are associated (connected) to the wireless switch. It will also display any Access Ports that are configured but are not online for whatever reason.
symbolusers.tmpl This is the HTML template used by the Perl script symbolusers.pl. See http://html-template.sourceforge.net/
   
passportarp.pl This is a Web CGI script that will try to locate a specific device connected to a Nortel Ethernet Routing Switch 8600. The script queries the IP ARP table of the switch and tries to identify the switch card and port the device is connected to. You will need the Net-SNMP perl libraries, CGI and DBI Perl modules along with the RAPID-CITY SNMP mib in order to run this script. Download the script here by right-clicking and selecting "Save As"
   

 

 

 

 

Last Updated: Saturday, January 19, 2008 04:22 PM