*swpin = *swpout = 0;
}
}
---- net-snmp-5.7.1/./agent/mibgroup/hardware/cpu/cpu_linux.c~ 2011-12-27 15:05:21.000000000 +0200
-+++ net-snmp-5.7.1/./agent/mibgroup/hardware/cpu/cpu_linux.c 2011-12-27 15:06:39.795180506 +0200
-@@ -320,5 +320,7 @@
- if (first)
- snmp_log(LOG_ERR, "No ctxt line in %s\n", STAT_FILE);
- }
+--- net-snmp-5.7.1/./agent/mibgroup/ucd-snmp/diskio.c~ 2011-09-28 07:53:47.000000000 +0300
++++ net-snmp-5.7.1/./agent/mibgroup/ucd-snmp/diskio.c 2011-12-27 16:33:10.128099629 +0200
+@@ -979,7 +979,8 @@
+ {
+ FILE* parts;
+ time_t now;
+-
++ static int first = 1;
+
-+ first = 0;
- }
+ now = time(NULL);
+ if (cache_time + CACHE_TIMEOUT > now) {
+ return 0;
+@@ -1024,7 +1025,11 @@
+ int rc;
+ parts = fopen("/proc/partitions", "r");
+ if (!parts) {
+- snmp_log_perror("/proc/partitions");
++ if (first) {
++ // log error only once
++ snmp_log_perror("/proc/partitions");
++ first = 0;
++ }
+ return 1;
+ }