@cryptotaxi247 / netdata-1 / commits / 4093cac2f

Change FreeBSD / macOS system.swap(io) to mem.swap(io) (#15769)

Dimitris P committed Aug 8, 2023 at 18:52 UTC 4093cac2fab29bffe3faf04c54e6960b128176e6
9 files changed +26 -26
build_external/scenarios/gaps_lo/mostly_off.conf
+2 -2
@@ -545,7 +545,7 @@ enabled = no
545 [cpu.cpu7_softirqs]
546 enabled = no
547
548 -[system.swapio]
548 +[mem.swapio]
549 enabled = no
550
551 [system.pgpgio]
@@ -560,7 +560,7 @@ enabled = no
560 [mem.available]
561 enabled = no
562
563 -[system.swap]
563 +[mem.swap]
564 enabled = no
565
566 [mem.committed]
collectors/ebpf.plugin/metadata.yaml
+1 -1
@@ -1376,7 +1376,7 @@ modules:
1376 description: "These metrics show total number of calls to functions inside kernel."
1377 labels: []
1378 metrics:
1379 - - name: system.swapcalls
1379 + - name: mem.swapcalls
1380 description: Calls to access swap memory
1381 unit: "calls/s"
1382 chart_type: line
collectors/freebsd.plugin/freebsd_sysctl.c
+6 -6
@@ -834,7 +834,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
834 static int mib[3] = {0, 0, 0};
835
836 if (unlikely(getsysctl_mib("vm.swap_info", mib, 2))) {
837 - collector_error("DISABLED: system.swap chart");
837 + collector_error("DISABLED: mem.swap chart");
838 collector_error("DISABLED: vm.swap_info module");
839 return 1;
840 } else {
@@ -853,13 +853,13 @@ int do_vm_swap_info(int update_every, usec_t dt) {
853 if (unlikely(sysctl(mib, 3, &xsw, &size, NULL, 0) == -1 )) {
854 if (unlikely(errno != ENOENT)) {
855 collector_error("FREEBSD: sysctl(%s...) failed: %s", "vm.swap_info", strerror(errno));
856 - collector_error("DISABLED: system.swap chart");
856 + collector_error("DISABLED: mem.swap chart");
857 collector_error("DISABLED: vm.swap_info module");
858 return 1;
859 } else {
860 if (unlikely(size != sizeof(xsw))) {
861 collector_error("FREEBSD: sysctl(%s...) expected %lu, got %lu", "vm.swap_info", (unsigned long)sizeof(xsw), (unsigned long)size);
862 - collector_error("DISABLED: system.swap chart");
862 + collector_error("DISABLED: mem.swap chart");
863 collector_error("DISABLED: vm.swap_info module");
864 return 1;
865 } else break;
@@ -874,7 +874,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
874
875 if (unlikely(!st)) {
876 st = rrdset_create_localhost(
877 - "system",
877 + "mem",
878 "swap",
879 NULL,
880 "swap",
@@ -883,7 +883,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
883 "MiB",
884 "freebsd.plugin",
885 "vm.swap_info",
886 - NETDATA_CHART_PRIO_SYSTEM_SWAP,
886 + NETDATA_CHART_PRIO_MEM_SWAP,
887 update_every,
888 RRDSET_TYPE_STACKED
889 );
@@ -1026,7 +1026,7 @@ int do_vm_stats_sys_v_swappgs(int update_every, usec_t dt) {
1026
1027 if (unlikely(GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsin", mib_swappgsin, vmmeter_data.v_swappgsin) ||
1028 GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsout", mib_swappgsout, vmmeter_data.v_swappgsout))) {
1029 - collector_error("DISABLED: system.swapio chart");
1029 + collector_error("DISABLED: mem.swapio chart");
1030 collector_error("DISABLED: vm.stats.vm.v_swappgs module");
1031 return 1;
1032 } else {
collectors/freebsd.plugin/metadata.yaml
+4 -4
@@ -851,7 +851,7 @@ modules:
851 alerts:
852 - name: used_swap
853 link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
854 - metric: system.swap
854 + metric: mem.swap
855 info: swap memory utilization
856 os: "linux freebsd"
857 metrics:
@@ -865,7 +865,7 @@ modules:
865 description: "This metric shows the SWAP usage."
866 labels: []
867 metrics:
868 - - name: system.swap
868 + - name: mem.swap
869 description: System Swap
870 unit: "MiB"
871 chart_type: stacked
@@ -1043,7 +1043,7 @@ modules:
1043 alerts:
1044 - name: 30min_ram_swapped_out
1045 link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
1046 - metric: system.swapio
1046 + metric: mem.swapio
1047 info: percentage of the system RAM swapped in the last 30 minutes
1048 os: "linux freebsd"
1049 metrics:
@@ -1057,7 +1057,7 @@ modules:
1057 description: "This metric shows events happening on SWAP."
1058 labels: []
1059 metrics:
1060 - - name: system.swapio
1060 + - name: mem.swapio
1061 description: Swap I/O
1062 unit: "KiB/s"
1063 chart_type: area
collectors/macos.plugin/macos_mach_smi.c
+3 -3
@@ -99,7 +99,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
99 do_ram = 0;
100 collector_error("DISABLED: system.ram");
101 do_swapio = 0;
102 - collector_error("DISABLED: system.swapio");
102 + collector_error("DISABLED: mem.swapio");
103 do_pgfaults = 0;
104 collector_error("DISABLED: mem.pgfaults");
105 } else {
@@ -148,10 +148,10 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
148
149 #if (defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
150 if (likely(do_swapio)) {
151 - st = rrdset_find_active_localhost("system.swapio");
151 + st = rrdset_find_active_localhost("mem.swapio");
152 if (unlikely(!st)) {
153 st = rrdset_create_localhost(
154 - "system"
154 + "mem"
155 , "swapio"
156 , NULL
157 , "swap"
collectors/macos.plugin/macos_sysctl.c
+3 -3
@@ -260,12 +260,12 @@ int do_macos_sysctl(int update_every, usec_t dt) {
260 if (likely(do_swap)) {
261 if (unlikely(GETSYSCTL_BY_NAME("vm.swapusage", swap_usage))) {
262 do_swap = 0;
263 - collector_error("DISABLED: system.swap");
263 + collector_error("DISABLED: mem.swap");
264 } else {
265 - st = rrdset_find_active_localhost("system.swap");
265 + st = rrdset_find_active_localhost("mem.swap");
266 if (unlikely(!st)) {
267 st = rrdset_create_localhost(
268 - "system"
268 + "mem"
269 , "swap"
270 , NULL
271 , "swap"
collectors/macos.plugin/metadata.yaml
+2 -2
@@ -317,7 +317,7 @@ modules:
317 - name: purgeable
318 - name: speculative
319 - name: free
320 - - name: system.swapio
320 + - name: mem.swapio
321 description: Swap I/O
322 unit: "KiB/s"
323 chart_type: area
@@ -346,7 +346,7 @@ modules:
346 - name: load1
347 - name: load5
348 - name: load15
349 - - name: system.swap
349 + - name: mem.swap
350 description: System Swap
351 unit: "MiB"
352 chart_type: stacked
collectors/proc.plugin/metadata.yaml
+3 -3
@@ -465,7 +465,7 @@ modules:
465 alerts:
466 - name: 30min_ram_swapped_out
467 link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
468 - metric: system.swapio
468 + metric: mem.swapio
469 info: percentage of the system RAM swapped in the last 30 minutes
470 os: "linux freebsd"
471 - name: oom_kill
@@ -484,7 +484,7 @@ modules:
484 description: ""
485 labels: []
486 metrics:
487 - - name: system.swapio
487 + - name: mem.swapio
488 description: Swap I/O
489 unit: "KiB/s"
490 chart_type: area
@@ -1340,7 +1340,7 @@ modules:
1340 os: "linux"
1341 - name: used_swap
1342 link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
1343 - metric: system.swap
1343 + metric: mem.swap
1344 info: swap memory utilization
1345 os: "linux freebsd"
1346 - name: 1hour_memory_hw_corrupted
web/gui/dashboard_info.js
+2 -2
@@ -1530,7 +1530,7 @@ netdataDashboard.context = {
1530 info: 'Memory paged from/to disk. This is usually the total disk I/O of the system.'
1531 },
1532
1533 - 'system.swapio': {
1533 + 'mem.swapio': {
1534 info: '<p>System swap I/O.</p>'+
1535 '<b>In</b> - pages the system has swapped in from disk to RAM. '+
1536 '<b>Out</b> - pages the system has swapped out from RAM to disk.'
@@ -1675,7 +1675,7 @@ netdataDashboard.context = {
1675 info: 'System Random Access Memory (i.e. physical memory) usage.'
1676 },
1677
1678 - 'system.swap': {
1678 + 'mem.swap': {
1679 info: 'System swap memory usage. Swap space is used when the amount of physical memory (RAM) is full. When the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space (usually a disk, a disk partition or a file).'
1680 },
1681