@cryptotaxi247 / netdata-1 / commits / 16487cf69

Rename the chart of real memory usage in FreeBSD (#13271)

Vladimir Kobal committed Jun 30, 2022 at 17:26 UTC 16487cf699178159488118b7369d8283bbefab89
2 files changed +14 -9
collectors/freebsd.plugin/freebsd_sysctl.c
+9 -9
@@ -178,15 +178,15 @@ int do_vm_loadavg(int update_every, usec_t dt){
178
179 int do_vm_vmtotal(int update_every, usec_t dt) {
180 (void)dt;
181 - static int do_all_processes = -1, do_processes = -1, do_committed = -1;
181 + static int do_all_processes = -1, do_processes = -1, do_mem_real = -1;
182
183 if (unlikely(do_all_processes == -1)) {
184 do_all_processes = config_get_boolean("plugin:freebsd:vm.vmtotal", "enable total processes", 1);
185 do_processes = config_get_boolean("plugin:freebsd:vm.vmtotal", "processes running", 1);
186 - do_committed = config_get_boolean("plugin:freebsd:vm.vmtotal", "committed memory", 1);
186 + do_mem_real = config_get_boolean("plugin:freebsd:vm.vmtotal", "real memory", 1);
187 }
188
189 - if (likely(do_all_processes | do_processes | do_committed)) {
189 + if (likely(do_all_processes | do_processes | do_mem_real)) {
190 static int mib[2] = {0, 0};
191 struct vmtotal vmtotal_data;
192
@@ -195,8 +195,8 @@ int do_vm_vmtotal(int update_every, usec_t dt) {
195 error("DISABLED: system.active_processes chart");
196 do_processes = 0;
197 error("DISABLED: system.processes chart");
198 - do_committed = 0;
199 - error("DISABLED: mem.committed chart");
198 + do_mem_real = 0;
199 + error("DISABLED: mem.real chart");
200 error("DISABLED: vm.vmtotal module");
201 return 1;
202 } else {
@@ -264,18 +264,18 @@ int do_vm_vmtotal(int update_every, usec_t dt) {
264
265 // --------------------------------------------------------------------
266
267 - if (likely(do_committed)) {
267 + if (likely(do_mem_real)) {
268 static RRDSET *st = NULL;
269 static RRDDIM *rd = NULL;
270
271 if (unlikely(!st)) {
272 st = rrdset_create_localhost(
273 "mem",
274 - "committed",
274 + "real",
275 NULL,
276 "system",
277 NULL,
278 - "Committed (Allocated) Memory",
278 + "Total Real Memory In Use",
279 "MiB",
280 "freebsd.plugin",
281 "vm.vmtotal",
@@ -285,7 +285,7 @@ int do_vm_vmtotal(int update_every, usec_t dt) {
285 );
286 rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
287
288 - rd = rrddim_add(st, "Committed_AS", NULL, system_pagesize, MEGA_FACTOR, RRD_ALGORITHM_ABSOLUTE);
288 + rd = rrddim_add(st, "used", NULL, system_pagesize, MEGA_FACTOR, RRD_ALGORITHM_ABSOLUTE);
289 }
290 else rrdset_next(st);
291
web/gui/dashboard_info.js
+5
@@ -1703,6 +1703,11 @@ netdataDashboard.context = {
1703 info: 'Committed Memory, is the sum of all memory which has been allocated by processes.'
1704 },
1705
1706 + 'mem.real': {
1707 + colors: NETDATA.colors[3],
1708 + info: 'Total amount of real (physical) memory used.'
1709 + },
1710 +
1711 'mem.oom_kill': {
1712 info: 'The number of processes killed by '+
1713 '<a href="https://en.wikipedia.org/wiki/Out_of_memory" target="_blank">Out of Memory</a> Killer. '+