#! /usr/local/bin/perl -w #This program is used by HPOV as a pop-up option to see the #show controllers response of a ubr port. This program will #be available when an interface is highlighted. #INPUT: uBR-3C:Ca3/0-upstream2 #AUTHOR: becki@anv.net use Net::Telnet::Cisco; $file = ''; #the file that contains the CMTS passwords 1 per line while (@ARGV) { $ubr = (shift @ARGV); # $port = (shift @ARGV); } $blade = $ubr; $ubr =~ s/:.*//; $blade =~ s/.*://; $port = $blade; $blade =~ s/-.*//; $port =~ s/.*upstream//; open(FILE, "<$file") or die "Couldn't open $file for reading\n"; while() { @input = split; } $global = $input[0]; $priv = $input[1]; my $cs = Net::Telnet::Cisco->new( Host => $ubr ); $cs->login( '' , $global ); $cs->enable( $priv ); # Turn off paging my @cmd_output = $cs->cmd( 'terminal length 0' ); # get cable modem summary table @cmd_output = $cs->cmd( "sh controllers $blade up $port" ); print @cmd_output; $cs->close;