prevent the delay to charge the netfilter alarm
Costa Tsaousis (ktsaou) committed
Nov 22, 2016 at 02:43 UTC
fe0a9f03c76dd9d7839a880e77d889a7dcda9aaa
1 file changed
+2
-2
src/proc_net_stat_conntrack.c
+2
-2
@@ -21,7 +21,7 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
21
22
snprintfz(filename, FILENAME_MAX, "%s%s", global_host_prefix, "/proc/sys/net/netfilter/nf_conntrack_max");
23
nf_conntrack_max_filename = config_get("plugin:proc:/proc/sys/net/netfilter/nf_conntrack_max", "filename to monitor", filename);
24
- get_max_every = config_get_number("plugin:proc:/proc/sys/net/netfilter/nf_conntrack_max", "read every seconds", 10) * 1000000ULL;
24
+ usec_since_last_max = get_max_every = config_get_number("plugin:proc:/proc/sys/net/netfilter/nf_conntrack_max", "read every seconds", 10) * 1000000ULL;
25
26
read_full = 1;
27
ff = procfile_open(nf_conntrack_filename, " \t:", PROCFILE_FLAG_DEFAULT);
@@ -117,7 +117,7 @@ int do_proc_net_stat_conntrack(int update_every, unsigned long long dt) {
117
}
118
119
usec_since_last_max += dt;
120
- if(unlikely(rrdvar_max && usec_since_last_max > get_max_every)) {
120
+ if(unlikely(rrdvar_max && usec_since_last_max >= get_max_every)) {
121
usec_since_last_max = 0;
122
123
unsigned long long max;