Cisco::Version
Cisco::Version is a perl module available on CPAN. This module makes it easy to parse the output of Cisco’s “show version” command. The module has been tested on different Cisco chassis (routers and switches).
Here’s a short perl snippet how to use Cisco::Version
use Cisco::Version;
## crate a new Cisco::Version object
my $sv = Cisco::Version->new(<output of ’show version’ here>);## parse the output
$sv->parse();## and get some results
# print the amount of RAM found
print “total DRAM memory = “, $sv->get_memory(), “\n”;# print the largest flash size
print “largest flash size = “, $sv->get_flash_largest_size(), “\n”;
This information can be extracted at the moment :
- software version information
- bootstrap information
- bootloader information
- uptime
- reload reason
- reload time
- software image file
- DRAM memory information
- flash information
- configuration registry
- password recovery mechanism
Documentation and examples can be found here.