tcp_mem host variables are in KB (like the charts)
Costa Tsaousis (ktsaou) committed
Nov 8, 2017 at 10:08 UTC
8c34ec46a3ff807f0c6ed2b70663986412370ba3
1 file changed
+3
-3
src/proc_net_sockstat.c
+3
-3
@@ -56,9 +56,9 @@ static int read_tcp_mem(void) {
56
57
// fprintf(stderr, "TCP MEM low = %llu, pressure = %llu, high = %llu\n", low, pressure, high);
58
59
- rrdvar_custom_host_variable_set(localhost, tcp_mem_low_threshold, low * sysconf(_SC_PAGESIZE));
60
- rrdvar_custom_host_variable_set(localhost, tcp_mem_pressure_threshold, pressure * sysconf(_SC_PAGESIZE));
61
- rrdvar_custom_host_variable_set(localhost, tcp_mem_high_threshold, high * sysconf(_SC_PAGESIZE));
59
+ rrdvar_custom_host_variable_set(localhost, tcp_mem_low_threshold, low * sysconf(_SC_PAGESIZE) / 1024);
60
+ rrdvar_custom_host_variable_set(localhost, tcp_mem_pressure_threshold, pressure * sysconf(_SC_PAGESIZE) / 1024);
61
+ rrdvar_custom_host_variable_set(localhost, tcp_mem_high_threshold, high * sysconf(_SC_PAGESIZE) / 1024);
62
63
return 0;
64
}