Razvan Cosma
2012-08-23 08:37:55 UTC
Hello,
I'm trying to understand how rancid parses the output of various commands,
to adapt it for BlueCoat; the console is similar with Cisco's and clogin
works for it, can't figure out exactly what /usr/libexec/rancid/rancid does
though. I've replaced the executed commands with these three: show
configuration noprompts, show version and show advanced-url
/Diagnostics/Hardware/Info/
The output is something like
su - rancid -c 'clogin labhost'
labhost
spawn ssh -c 3des -x -l root labhost
***@labhost's password:
Lab_Host>enable
Enable Password:
Lab_Host#
^^ so far so good
Lab_Host#show version
show version
Version: SGOS 5.5.9.1 Proxy Edition
Release id: 81874
UI Version: 5.5.9.1 Build: 81874
Serial number: 1234567890
NIC 0 MAC: 00AABBCCDDEE
Lab_Host#show advanced-url /Diagnostics/Hardware/Info/
show advanced-url /Diagnostics/Hardware/Info/
Hardware Information
Model: 510-A
RAM: 1024 MB
DIMM 1: empty
DIMM 2: 1024 MB SDRAM DDR
Number of CPUs: 1
CPU frequency: 2000 MHz
Bus speed: 100 MHz
Storage: 1 drive
Disk in slot 1: 80 GB (SEAGATE ST3808110AS, rev:3.AAH,
serial:ABCD123)
Disk in slot 2: empty
Network:
Interface 0:0: Intel Gigabit running at 1 Gbps full duplex (MAC
00:AA:BB:CC:DD:EE)
Interface 1:0: Intel Gigabit running at 1 Gbps full duplex (MAC
00:AA:BB:CC:EE:DD)
Accelerators: none
Lab_Host#
I'll skip the sh conf no as it's very long, output looks very much like a
cisco sh runn though so I was hoping just editing @commandtable and using
the cisco functions would collect the output. After adding it in
%vendortable in rancid-fe and doing a su - rancid -c 'rancid-run -m
myaddress -r labhost' it seems to do the trick, I'm sure it can be improved
though so suggestions welcome. The bcrancid file is attached.
I'm trying to understand how rancid parses the output of various commands,
to adapt it for BlueCoat; the console is similar with Cisco's and clogin
works for it, can't figure out exactly what /usr/libexec/rancid/rancid does
though. I've replaced the executed commands with these three: show
configuration noprompts, show version and show advanced-url
/Diagnostics/Hardware/Info/
The output is something like
su - rancid -c 'clogin labhost'
labhost
spawn ssh -c 3des -x -l root labhost
***@labhost's password:
Lab_Host>enable
Enable Password:
Lab_Host#
^^ so far so good
Lab_Host#show version
show version
Version: SGOS 5.5.9.1 Proxy Edition
Release id: 81874
UI Version: 5.5.9.1 Build: 81874
Serial number: 1234567890
NIC 0 MAC: 00AABBCCDDEE
Lab_Host#show advanced-url /Diagnostics/Hardware/Info/
show advanced-url /Diagnostics/Hardware/Info/
Hardware Information
Model: 510-A
RAM: 1024 MB
DIMM 1: empty
DIMM 2: 1024 MB SDRAM DDR
Number of CPUs: 1
CPU frequency: 2000 MHz
Bus speed: 100 MHz
Storage: 1 drive
Disk in slot 1: 80 GB (SEAGATE ST3808110AS, rev:3.AAH,
serial:ABCD123)
Disk in slot 2: empty
Network:
Interface 0:0: Intel Gigabit running at 1 Gbps full duplex (MAC
00:AA:BB:CC:DD:EE)
Interface 1:0: Intel Gigabit running at 1 Gbps full duplex (MAC
00:AA:BB:CC:EE:DD)
Accelerators: none
Lab_Host#
I'll skip the sh conf no as it's very long, output looks very much like a
cisco sh runn though so I was hoping just editing @commandtable and using
the cisco functions would collect the output. After adding it in
%vendortable in rancid-fe and doing a su - rancid -c 'rancid-run -m
myaddress -r labhost' it seems to do the trick, I'm sure it can be improved
though so suggestions welcome. The bcrancid file is attached.