b5ae06
877326 - dskEntry should be cached
b5ae06
b5ae06
commit ca7b17a41d4d16bd27aacf92116bea3562eeea36
b5ae06
Author: Jan Safranek <jsafranek@users.sourceforge.net>
b5ae06
Date:   Mon Dec 17 12:40:32 2012 +0100
b5ae06
b5ae06
    CHANGES: snmpd: use cache for dskTable to speed it up.
b5ae06
    
b5ae06
    UCD-SNMP::dskTable was slow on NFS mounts. Now it uses fsys cache
b5ae06
    to reload mounts every 5 seconds.
b5ae06
b5ae06
diff --git a/agent/mibgroup/ucd-snmp/disk_hw.c b/agent/mibgroup/ucd-snmp/disk_hw.c
b5ae06
index 93ecde3..ea37610 100644
b5ae06
--- a/agent/mibgroup/ucd-snmp/disk_hw.c
b5ae06
+++ b/agent/mibgroup/ucd-snmp/disk_hw.c
b5ae06
@@ -305,8 +305,11 @@ var_extensible_disk(struct variable *vp,
b5ae06
     unsigned long long val;
b5ae06
     static long     long_ret;
b5ae06
     static char     errmsg[300];
b5ae06
+    netsnmp_cache  *cache;
b5ae06
 
b5ae06
-    netsnmp_fsys_load( NULL, NULL );  /* Update the fsys H/W module */
b5ae06
+    /* Update the fsys H/W module */
b5ae06
+    cache = netsnmp_fsys_get_cache();
b5ae06
+    netsnmp_cache_check_and_reload(cache);
b5ae06
 
b5ae06
 tryAgain:
b5ae06
     if (header_simple_table