summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp/snmp_mibII/mibII.h
diff options
context:
space:
mode:
authorsyrinx <syrinx@FreeBSD.org>2009-12-03 16:08:00 +0000
committersyrinx <syrinx@FreeBSD.org>2009-12-03 16:08:00 +0000
commit3f6e5c4df53d4a7718a0f41931a9ff7fdc66e9ca (patch)
tree520582a3b754a46d8d4bf52f165cb0ba8b2d350d /contrib/bsnmp/snmp_mibII/mibII.h
parent879c7d27302e0fb0654529de4b88f210ee11b022 (diff)
downloadFreeBSD-src-3f6e5c4df53d4a7718a0f41931a9ff7fdc66e9ca.zip
FreeBSD-src-3f6e5c4df53d4a7718a0f41931a9ff7fdc66e9ca.tar.gz
Fix a problem with high CPU consumption (up to 30%) by bsnmpd on a loaded system.
Instead of constantly calling the mibII_idle function when the server is not busy call the function only once every 10 seconds to avoid bsnmpd constantly doing gettimeofday syscalls. Make the idle polling interval confugurable via begemotIfDataPoll. Reported and tested by: misho (at) aitbg (dot) com Oked by: harti MFC after: 1 week
Diffstat (limited to 'contrib/bsnmp/snmp_mibII/mibII.h')
-rw-r--r--contrib/bsnmp/snmp_mibII/mibII.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/bsnmp/snmp_mibII/mibII.h b/contrib/bsnmp/snmp_mibII/mibII.h
index a21e023..0ebde9a 100644
--- a/contrib/bsnmp/snmp_mibII/mibII.h
+++ b/contrib/bsnmp/snmp_mibII/mibII.h
@@ -211,6 +211,14 @@ extern u_int mibif_hc_update_interval;
/* re-compute update interval */
void mibif_reset_hc_timer(void);
+/* interfaces' data poll interval */
+extern u_int mibII_poll_ticks;
+
+/* restart the data poll timer */
+void mibif_restart_mibII_poll_timer(void);
+
+#define MIBII_POLL_TICKS 100
+
/* get interfaces and interface addresses. */
void mib_fetch_interfaces(void);
OpenPOWER on IntegriCloud