Counter Values From snmpd exec Option May Not Increment If Significant System Date/Time Change Takes Place (Doc ID 1937186.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 10 3/05 to 10 1/13 U11 [Release 10.0]
Information in this document applies to any platform.

Symptoms

Issue was reported that counters collected via a SNMp query did not increment after a significant system date/time change took place and was corrected.

Stale information would continue to returned.

The /var/sma_snmp/.snmp-exec-cache file would not be updated to a correct date/time after the system date/time was corrected.

In this case the exec command was executing a dlmod command for interface packet counters

Entry in the /etc/sma/snmp/snmpd.conf file:

exec .1.3.6.1.4.1.2021.52 nic-status /usr/sbin/dladm show-dev -s

Example of a failure.

Date and time are correct

# date
Fri Sep 19 09:08:10 EDT 2014

Date is changed to 2016

# date 091909082016
Mon Sep 19 09:08:00 EDT 2016

Date on file /var/sma_snmp/.snmp-exec-cache is unchanged

# ls -al
total 10
drwx------   2 root     root         512 Sep 11  2014 .
drwxr-xr-x  49 root     sys         1024 Jul  1  2013 ..
-rw-r--r--   1 root     root         190 Sep 11  2014 .snmp-exec-cache
-rw-------   1 root     root         324 Oct 31  2011 fmd-trapgen.conf
-rw-------   1 root     root         315 Sep 10  2014 snmpd.conf

A snmpwalk is issued while the system date was 2016

# /usr/sfw/bin/snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.52.101
UCD-SNMP-MIB::ucdavis.52.101.1 = STRING: "..ipackets  rbytes. ierrors opackets. obytes.     oerrors"
UCD-SNMP-MIB::ucdavis.52.101.2 = STRING: "ce0..13536205  980375875   0       10087362  795958358   0       "
UCD-SNMP-MIB::ucdavis.52.101.3 = STRING: "ce1..7137673   487493633   4       755808    56673460    0       "

File .snmp-exec-cache is updated with date/time in 2016

# ls -al
total 10
drwx------   2 root     root         512 Sep 19 09:08 .
drwxr-xr-x  49 root     sys         1024 Jul  1  2013 ..
-rw-r--r--   1 root     root         190 Sep 19 09:08 .snmp-exec-cache
-rw-------   1 root     root         324 Oct 31  2011 fmd-trapgen.conf
-rw-------   1 root     root         315 Sep 10  2014 snmpd.conf

A snmpwalk command within cache time of 30 seconds shows previous counters as expected

# /usr/sfw/bin/snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.52.101
UCD-SNMP-MIB::ucdavis.52.101.1 = STRING: "..ipackets  rbytes. ierrors opackets. obytes.     oerrors"
UCD-SNMP-MIB::ucdavis.52.101.2 = STRING: "ce0..13536205  980375875   0       10087362  795958358   0       "
UCD-SNMP-MIB::ucdavis.52.101.3 = STRING: "ce1..7137673   487493633   4       755808    56673460    0       "

Executed again with cache time passed and counters are updated as expected


# date
Mon Sep 19 09:09:07 EDT 2016
# /usr/sfw/bin/snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.52.101
UCD-SNMP-MIB::ucdavis.52.101.1 = STRING: "..ipackets  rbytes. ierrors opackets. obytes.     oerrors"
UCD-SNMP-MIB::ucdavis.52.101.2 = STRING: "ce0..13536288  980382384   0       10087394  795963659   0       "
UCD-SNMP-MIB::ucdavis.52.101.3 = STRING: "ce1..7137745   487499431   4       755808    56673460    0       "

Corrected system date to 2014 and file date has not changed

# date 091909112014
Fri Sep 19 09:11:00 EDT 2014

# ls -al
total 10
drwx------   2 root     root         512 Sep 19  2016 .
drwxr-xr-x  49 root     sys         1024 Jul  1  2013 ..
-rw-r--r--   1 root     root         190 Sep 19  2016 .snmp-exec-cache
-rw-------   1 root     root         324 Oct 31  2011 fmd-trapgen.conf
-rw-------   1 root     root         315 Sep 10 15:28 snmpd.conf

Multiple snmpwalk commands issued continue to show the same counters. The 30 second cache expiration does appear to take place

# /usr/sfw/bin/snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.52.101
UCD-SNMP-MIB::ucdavis.52.101.1 = STRING: "..ipackets  rbytes. ierrors opackets. obytes.     oerrors"
UCD-SNMP-MIB::ucdavis.52.101.2 = STRING: "ce0..13536288  980382384   0       10087394  795963659   0       "
UCD-SNMP-MIB::ucdavis.52.101.3 = STRING: "ce1..7137745   487499431   4       755808    56673460    0       "

# /usr/sfw/bin/snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.52.101
UCD-SNMP-MIB::ucdavis.52.101.1 = STRING: "..ipackets  rbytes. ierrors opackets. obytes.     oerrors"
UCD-SNMP-MIB::ucdavis.52.101.2 = STRING: "ce0..13536288  980382384   0       10087394  795963659   0       "
UCD-SNMP-MIB::ucdavis.52.101.3 = STRING: "ce1..7137745   487499431   4       755808    56673460    0       "

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms