Menu

#13 show tech on 2948 switch fails

open
nobody
None
5
2005-01-29
2005-01-29
Anonymous
No

The output from a "show tech" command on a Cisco
2948-24 switch contains the string "%CPU" at the
beginning of a line. This causes the cmd() function to
fail because it thinks an invalid command was typed in.
I modified Cisco.pm on my system to verify the bug.
Here is the change I made:

Replace

if ( ( substr $out[$i], 0, 1 ) eq '%' ) {

with

if ( (( substr $out[$i], 0, 1 ) eq '%') && (( substr $out
[$i], 0, 4) ne '%CPU') ) {

in sub cmd {} in Cisco.pm

My version of Cisco.pm is 1.10.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB