Perl script to issue IOS commands and save to local files from a given IP list

Can anybody point to a perl script that can issue IOS commands and save to local files from a given IP list. I am currently using one of the perl scripts and it doesn't have an error checking. So, whenever the remote device from a given IP list is not respond, it stop. It would be good to have a script that can skip the non-responding IP, log the non-responding IPs, and continue with the rest of the IPs in the given list.

Below is the script that I am currently using:

#!/usr/bin/perl -w use Net::Telnet::Cisco; @devices = `cat my_devices_ip_list.txt`; foreach my $device (@devices) { chomp($device); my $session = Net::Telnet::Cisco->new(Host => $device); $session->login('my_user_name','my_password'); $session->enable("my_enable_password"); @ver = $session->cmd("sh ver"); open LOG, "> $device.conf"; select LOG; print @ver; close LOG; }

Reply to
aung.naingoo
Loading thread data ...

Have you looked at Cisco Beyond?

formatting link
and Cosi-nms?

formatting link
Good source for some scripts you may want to hack on.

Reply to
Phillip Remaker

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.