Operating System - HP-UX
1819872 Members
2725 Online
109607 Solutions
New Discussion

Unused ports on a Cisco switch -

 
Rob Johnson_3
Regular Advisor

Unused ports on a Cisco switch -

I'm posting to this section of the forum because I always get quick and accurate responses for sysadmin stuff as well as light script stuff...

I'm in need of a script I can run against a switch or set of switches to report on ports that have been down for a period of 45 days or longer.

I've figured out how to do this manually by walking sysUptime of a switch, the ifOperStatus to find a port that is down then subtracting the sysUptime timeticks from the ifLastChange timeticks of an interface that is down then dividing that value by 8640000 to get the number of days a port has been down.

I found a perl script yesterday evening that might work but haven't been able to try it out yet because I'll need to get permission most importantly then get perl installed on a particular windows box along with the Net::SNMP module and I don't know if and when I can make that happen.

I'm hoping someone has already done this using shell so I can run it "as is" on any of several unix boxes I have access to.

Thanks for any responses.
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: Unused ports on a Cisco switch -

Rob,

Your perl script will probably run on a Unix box.

whence perl

change the script to get perl where the Unix box provides it. You will need to isntall the SNMP perl module and have permission from the switch to run this operations.

Cisco switches do have IP addresses and are normally configured to require authentication.

This really is the correct place for this query, if you intend to run your script on a HP-UX box. Otherwise, not so much.

Good Luck,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com