[rancid] Adding IOS Commands to Rancid 3.1
Chip Pleasants
wpleasants at gmail.com
Wed Apr 8 20:18:27 UTC 2015
I couldn't find anything that discussed this in detail, so I'm hoping
someone could give me a little direction. I'm trying to add a new command
in rancid 3.1 for IOS devices and its not issuing the command i'm trying to
add when running rancid. it doesn't seem its looking at the
rancid.types.conf file when running. I've modified the
/etc/rancid/rancid.types.conf and the /usr/share/perl5/vendor_perl/rancid/
ios.pm. I've added my additions right about the "chow version" statement in
both files. Below are my the additions to each file and some debug out when
I run rancid. Thanks in advance for taking the time to assist and let me
know if I can provide any more information.
-Chip
[rancid at server02 ~]$ cat /etc/rancid/rancid.types.conf | grep
ShowArchiveConfigDiff
cisco;command;ios::ShowArchiveConfigDiff;show archive config diff
[rancid at server02 ~]$ sudo nano /usr/share/perl5/vendor_perl/rancid/ios.pm
# This routine parses "ShowArchiveConfigDiff"
sub ShowArchiveConfigDiff {
my($INPUT, $OUTPUT, $cmd) = @_;
print STDERR " In ShowArchiveConfigDiff: $_" if ($debug);
while (<$INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
next if (/^\s+\^$/);
return(1) if (/Line has invalid autocommand /);
return(1) if (/(invalid (input|command) detected|type help or )/i);
if (/current template is/) {
ProcessHistory("COMMENTS","keysort","IO","!Diff: $_");
}
}
ProcessHistory("COMMENTS","keysort","IO","!\n");
return(0);
}
[rancid at server02 ~]$ /usr/libexec/rancid/rancid -t cisco -d router.inc.net
loadtype: device type cisco
loadtype: found device type cisco in /etc/rancid/rancid.types.base
executing clogin -t 90 -c"show version;show redundancy secondary;show
idprom backplane;show install active;show env all;show rsp
chassis-info;show gsr chassis;show diag chassis-info;show boot;show
bootvar;show variables boot;show flash;dir /all nvram:;dir /all
bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all
disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all
harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all
sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all
slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all
slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all
slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all
sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all
sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show
controllers;show controllers cbus;show diagbus;show diag;show capture;show
module;show spe version;show c7200;show inventory raw;show vtp status;show
vlan;show vlan-switch;show switch detail;show sdm prefer;show system
mtu;show debug;show shun;more system:running-config;show running-config
view full;show running-config;write term" router.inc.net
PROMPT MATCH: router#
HIT COMMAND:router#show version
In ShowVersion: router#show version
TYPE = ASR1001
HIT COMMAND:router#show redundancy secondary
In ShowRedundancy: router#show redundancy secondary
HIT COMMAND:router#show idprom backplane
In ShowIDprom: router#show idprom backplane
HIT COMMAND:router#show install active
In ShowInstallActive: router#show install active
HIT COMMAND:router#show env all
In ShowEnv: router#show env all
HIT COMMAND:router#show rsp chassis-info
In ShowRSP: router#show rsp chassis-info
HIT COMMAND:router#show gsr chassis
In ShowGSR: router#show gsr chassis
HIT COMMAND:router#show diag chassis-info
In ShowGSR: router#show diag chassis-info
HIT COMMAND:router#show boot
In ShowBoot: router#show boot
HIT COMMAND:router#show bootvar
In ShowBoot: router#show bootvar
HIT COMMAND:router#show variables boot
In ShowBoot: router#show variables boot
HIT COMMAND:router#show flash
In ShowFlash: router#show flash
HIT COMMAND:router#dir /all nvram:
In DirSlotN: router#dir /all nvram:
HIT COMMAND:router#dir /all bootflash:
In DirSlotN: router#dir /all bootflash:
HIT COMMAND:router#dir /all slot0:
In DirSlotN: router#dir /all slot0:
HIT COMMAND:router#dir /all disk0:
In DirSlotN: router#dir /all disk0:
HIT COMMAND:router#dir /all slot1:
In DirSlotN: router#dir /all slot1:
HIT COMMAND:router#dir /all disk1:
In DirSlotN: router#dir /all disk1:
HIT COMMAND:router#dir /all slot2:
In DirSlotN: router#dir /all slot2:
HIT COMMAND:router#dir /all disk2:
In DirSlotN: router#dir /all disk2:
HIT COMMAND:router#dir /all harddisk:
In DirSlotN: router#dir /all harddisk:
HIT COMMAND:router#dir /all harddiska:
In DirSlotN: router#dir /all harddiska:
HIT COMMAND:router#dir /all harddiskb:
In DirSlotN: router#dir /all harddiskb:
HIT COMMAND:router#dir /all sup-bootdisk:
In DirSlotN: router#dir /all sup-bootdisk:
HIT COMMAND:router#dir /all sup-bootflash:
In DirSlotN: router#dir /all sup-bootflash:
HIT COMMAND:router#dir /all sup-microcode:
In DirSlotN: router#dir /all sup-microcode:
HIT COMMAND:router#dir /all slavenvram:
In DirSlotN: router#dir /all slavenvram:
HIT COMMAND:router#dir /all slavebootflash:
In DirSlotN: router#dir /all slavebootflash:
HIT COMMAND:router#dir /all slaveslot0:
In DirSlotN: router#dir /all slaveslot0:
HIT COMMAND:router#dir /all slavedisk0:
In DirSlotN: router#dir /all slavedisk0:
HIT COMMAND:router#dir /all slaveslot1:
In DirSlotN: router#dir /all slaveslot1:
HIT COMMAND:router#dir /all slavedisk1:
In DirSlotN: router#dir /all slavedisk1:
HIT COMMAND:router#dir /all slaveslot2:
In DirSlotN: router#dir /all slaveslot2:
HIT COMMAND:router#dir /all slavedisk2:
In DirSlotN: router#dir /all slavedisk2:
HIT COMMAND:router#dir /all slavesup-bootflash:
In DirSlotN: router#dir /all slavesup-bootflash:
HIT COMMAND:router#dir /all sec-nvram:
In DirSlotN: router#dir /all sec-nvram:
HIT COMMAND:router#dir /all sec-bootflash:
In DirSlotN: router#dir /all sec-bootflash:
HIT COMMAND:router#dir /all sec-slot0:
In DirSlotN: router#dir /all sec-slot0:
HIT COMMAND:router#dir /all sec-disk0:
In DirSlotN: router#dir /all sec-disk0:
HIT COMMAND:router#dir /all sec-slot1:
In DirSlotN: router#dir /all sec-slot1:
HIT COMMAND:router#dir /all sec-disk1:
In DirSlotN: router#dir /all sec-disk1:
HIT COMMAND:router#dir /all sec-slot2:
In DirSlotN: router#dir /all sec-slot2:
HIT COMMAND:router#dir /all sec-disk2:
In DirSlotN: router#dir /all sec-disk2:
HIT COMMAND:router#show controllers
In ShowContAll: router#show controllers
HIT COMMAND:router#show controllers cbus
In ShowContCbus: router#show controllers cbus
HIT COMMAND:router#show diagbus
In ShowDiagbus: router#show diagbus
HIT COMMAND:router#show diag
In ShowDiag: router#show diag
HIT COMMAND:router#show capture
In ShowCapture: router#show capture
HIT COMMAND:router#show module
In ShowModule: router#show module
HIT COMMAND:router#show spe version
In ShowSpeVersion: router#show spe version
HIT COMMAND:router#show c7200
In ShowC7200: router#show c7200
HIT COMMAND:router#show inventory raw
In ShowInventory: router#show inventory raw
HIT COMMAND:router#show vtp status
In ShowVTP: router#show vtp status
HIT COMMAND:router#show vlan
In ShowVLAN: router#show vlan
HIT COMMAND:router#show vlan-switch
In ShowVLAN: router#show vlan-switch
HIT COMMAND:router#show switch detail
In ShowDetail: router#show switch detail
HIT COMMAND:router#show sdm prefer
In ShowSDM: router#show sdm prefer
HIT COMMAND:router#show system mtu
In ShowMTU: router#show system mtu
HIT COMMAND:router#show debug
In ShowDebug: router#show debug
HIT COMMAND:router#show shun
In ShowShun: router#show shun
HIT COMMAND:router#more system:running-config
In WriteTerm: router#more system:running-config
HIT COMMAND:router#show running-config view full
In WriteTerm: router#show running-config view full
HIT COMMAND:router#show running-config
In WriteTerm: router#show running-config
HIT COMMAND:router#write term
In WriteTerm: router#write term
[rancid at server02 ~]$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150408/5ffeba9d/attachment.html>
More information about the Rancid-discuss
mailing list