Cisco SNMP – When Do Interface SNMP Counters Start from Zero?

snmp

Under which circumstances Cisco IOS interface SNMP counters(for example ifHCOutOctets or ifInErrors) start from zero? I am aware that clear counters does not affect SNMP counters. In addition, as far as I know, it is not possible to clear SNMP counters from CLI or with snmpset. However, reloading the router will. In addition, counter wrap(for example ifOutOctets will get larger than 4294967295) will cause SNMP counters to start from zero. Are there any other circumstances where Cisco IOS interface SNMP counters can start from zero?

Best Answer

SNMP counters will not be cleared while the device is up. The idea is that the software polling the counters will keep a tally of the current counter and simply looks at the delta since the last poll. See also this Cisco FAQ about SNMP counters, which says:

Q. How do I poll queue limit drops on a router?

A. With the use of SNMP, there is no way for the show interfaces command to break out the individual elements that go into the output drops.

Consider this new information about what goes into the output drops counter:

Input drops = Queue limit drops + Throttling drops + SMT queue full drops + RSRB drops + no buffer drops

In addition, SNMP counters are never cleared, even if the interfaces are cleared.