cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3435
Views
0
Helpful
2
Replies

Comparing startup-config / running-config Differences - automate

Adam Knutson
Level 1
Level 1

I am looking for ideas on comparing the dates the running-config was last changed, and the startup-config was last changed.

One way I know that I can do this is to just log into a switch/router via CLI, save the output, parse the dates, and compare using Python and SSH or Telnet.

 

Current configuration : 198613 bytes
!
! Last configuration change at 13:50:55 CDT Sat Aug 1 2015 by whoever
! NVRAM config last updated at 13:51:37 CDT Sat Aug 1 2015 by somebody

 

However, for a list of hundreds of switches, I don't feel it is the most efficient way, and would prefer to avoid having a script log into each switch and type show run | i !config.*

 

I do have RANCID set up, and may be able to grep those config files, but I wonder if anyone knows, can this be done easily with an SNMP query?  If so, does anyone know the MIB to use?

 

Thanks in advance, I look forward to hearing back!

1 Accepted Solution

Accepted Solutions

Steve Fuller
Level 9
Level 9

Hi Adam,

Take a look at the CISCO-CONFIG-MAN-MIB and specifically comparing the ccmHistoryRunningLastChanged and ccmHistoryRunningLastSaved objects. From the MIB:

"The value of sysUpTime when the running configuration was last saved (written).

If the value of ccmHistoryRunningLastChanged is greater than cmHistoryRunningLastSaved, the configuration has been changed but not saved."

Regards

View solution in original post

2 Replies 2

Steve Fuller
Level 9
Level 9

Hi Adam,

Take a look at the CISCO-CONFIG-MAN-MIB and specifically comparing the ccmHistoryRunningLastChanged and ccmHistoryRunningLastSaved objects. From the MIB:

"The value of sysUpTime when the running configuration was last saved (written).

If the value of ccmHistoryRunningLastChanged is greater than cmHistoryRunningLastSaved, the configuration has been changed but not saved."

Regards

Thanks,

Exactly what I was looking for.