0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-29 23:20:01 +00:00

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

This commit is contained in:
Dimitris P 2023-08-08 18:52:14 +01:00 committed by GitHub
parent 1c8e72dfea
commit 4093cac2fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 26 deletions
build_external/scenarios/gaps_lo
collectors
web/gui

View file

@ -545,7 +545,7 @@ enabled = no
[cpu.cpu7_softirqs] [cpu.cpu7_softirqs]
enabled = no enabled = no
[system.swapio] [mem.swapio]
enabled = no enabled = no
[system.pgpgio] [system.pgpgio]
@ -560,7 +560,7 @@ enabled = no
[mem.available] [mem.available]
enabled = no enabled = no
[system.swap] [mem.swap]
enabled = no enabled = no
[mem.committed] [mem.committed]

View file

@ -1376,7 +1376,7 @@ modules:
description: "These metrics show total number of calls to functions inside kernel." description: "These metrics show total number of calls to functions inside kernel."
labels: [] labels: []
metrics: metrics:
- name: system.swapcalls - name: mem.swapcalls
description: Calls to access swap memory description: Calls to access swap memory
unit: "calls/s" unit: "calls/s"
chart_type: line chart_type: line

View file

@ -834,7 +834,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
static int mib[3] = {0, 0, 0}; static int mib[3] = {0, 0, 0};
if (unlikely(getsysctl_mib("vm.swap_info", mib, 2))) { if (unlikely(getsysctl_mib("vm.swap_info", mib, 2))) {
collector_error("DISABLED: system.swap chart"); collector_error("DISABLED: mem.swap chart");
collector_error("DISABLED: vm.swap_info module"); collector_error("DISABLED: vm.swap_info module");
return 1; return 1;
} else { } else {
@ -853,13 +853,13 @@ int do_vm_swap_info(int update_every, usec_t dt) {
if (unlikely(sysctl(mib, 3, &xsw, &size, NULL, 0) == -1 )) { if (unlikely(sysctl(mib, 3, &xsw, &size, NULL, 0) == -1 )) {
if (unlikely(errno != ENOENT)) { if (unlikely(errno != ENOENT)) {
collector_error("FREEBSD: sysctl(%s...) failed: %s", "vm.swap_info", strerror(errno)); collector_error("FREEBSD: sysctl(%s...) failed: %s", "vm.swap_info", strerror(errno));
collector_error("DISABLED: system.swap chart"); collector_error("DISABLED: mem.swap chart");
collector_error("DISABLED: vm.swap_info module"); collector_error("DISABLED: vm.swap_info module");
return 1; return 1;
} else { } else {
if (unlikely(size != sizeof(xsw))) { if (unlikely(size != sizeof(xsw))) {
collector_error("FREEBSD: sysctl(%s...) expected %lu, got %lu", "vm.swap_info", (unsigned long)sizeof(xsw), (unsigned long)size); collector_error("FREEBSD: sysctl(%s...) expected %lu, got %lu", "vm.swap_info", (unsigned long)sizeof(xsw), (unsigned long)size);
collector_error("DISABLED: system.swap chart"); collector_error("DISABLED: mem.swap chart");
collector_error("DISABLED: vm.swap_info module"); collector_error("DISABLED: vm.swap_info module");
return 1; return 1;
} else break; } else break;
@ -874,7 +874,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
if (unlikely(!st)) { if (unlikely(!st)) {
st = rrdset_create_localhost( st = rrdset_create_localhost(
"system", "mem",
"swap", "swap",
NULL, NULL,
"swap", "swap",
@ -883,7 +883,7 @@ int do_vm_swap_info(int update_every, usec_t dt) {
"MiB", "MiB",
"freebsd.plugin", "freebsd.plugin",
"vm.swap_info", "vm.swap_info",
NETDATA_CHART_PRIO_SYSTEM_SWAP, NETDATA_CHART_PRIO_MEM_SWAP,
update_every, update_every,
RRDSET_TYPE_STACKED RRDSET_TYPE_STACKED
); );
@ -1026,7 +1026,7 @@ int do_vm_stats_sys_v_swappgs(int update_every, usec_t dt) {
if (unlikely(GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsin", mib_swappgsin, vmmeter_data.v_swappgsin) || if (unlikely(GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsin", mib_swappgsin, vmmeter_data.v_swappgsin) ||
GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsout", mib_swappgsout, vmmeter_data.v_swappgsout))) { GETSYSCTL_SIMPLE("vm.stats.vm.v_swappgsout", mib_swappgsout, vmmeter_data.v_swappgsout))) {
collector_error("DISABLED: system.swapio chart"); collector_error("DISABLED: mem.swapio chart");
collector_error("DISABLED: vm.stats.vm.v_swappgs module"); collector_error("DISABLED: vm.stats.vm.v_swappgs module");
return 1; return 1;
} else { } else {

View file

@ -851,7 +851,7 @@ modules:
alerts: alerts:
- name: used_swap - name: used_swap
link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
metric: system.swap metric: mem.swap
info: swap memory utilization info: swap memory utilization
os: "linux freebsd" os: "linux freebsd"
metrics: metrics:
@ -865,7 +865,7 @@ modules:
description: "This metric shows the SWAP usage." description: "This metric shows the SWAP usage."
labels: [] labels: []
metrics: metrics:
- name: system.swap - name: mem.swap
description: System Swap description: System Swap
unit: "MiB" unit: "MiB"
chart_type: stacked chart_type: stacked
@ -1043,7 +1043,7 @@ modules:
alerts: alerts:
- name: 30min_ram_swapped_out - name: 30min_ram_swapped_out
link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
metric: system.swapio metric: mem.swapio
info: percentage of the system RAM swapped in the last 30 minutes info: percentage of the system RAM swapped in the last 30 minutes
os: "linux freebsd" os: "linux freebsd"
metrics: metrics:
@ -1057,7 +1057,7 @@ modules:
description: "This metric shows events happening on SWAP." description: "This metric shows events happening on SWAP."
labels: [] labels: []
metrics: metrics:
- name: system.swapio - name: mem.swapio
description: Swap I/O description: Swap I/O
unit: "KiB/s" unit: "KiB/s"
chart_type: area chart_type: area

View file

@ -99,7 +99,7 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
do_ram = 0; do_ram = 0;
collector_error("DISABLED: system.ram"); collector_error("DISABLED: system.ram");
do_swapio = 0; do_swapio = 0;
collector_error("DISABLED: system.swapio"); collector_error("DISABLED: mem.swapio");
do_pgfaults = 0; do_pgfaults = 0;
collector_error("DISABLED: mem.pgfaults"); collector_error("DISABLED: mem.pgfaults");
} else { } else {
@ -148,10 +148,10 @@ int do_macos_mach_smi(int update_every, usec_t dt) {
#if (defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090) #if (defined __MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
if (likely(do_swapio)) { if (likely(do_swapio)) {
st = rrdset_find_active_localhost("system.swapio"); st = rrdset_find_active_localhost("mem.swapio");
if (unlikely(!st)) { if (unlikely(!st)) {
st = rrdset_create_localhost( st = rrdset_create_localhost(
"system" "mem"
, "swapio" , "swapio"
, NULL , NULL
, "swap" , "swap"

View file

@ -260,12 +260,12 @@ int do_macos_sysctl(int update_every, usec_t dt) {
if (likely(do_swap)) { if (likely(do_swap)) {
if (unlikely(GETSYSCTL_BY_NAME("vm.swapusage", swap_usage))) { if (unlikely(GETSYSCTL_BY_NAME("vm.swapusage", swap_usage))) {
do_swap = 0; do_swap = 0;
collector_error("DISABLED: system.swap"); collector_error("DISABLED: mem.swap");
} else { } else {
st = rrdset_find_active_localhost("system.swap"); st = rrdset_find_active_localhost("mem.swap");
if (unlikely(!st)) { if (unlikely(!st)) {
st = rrdset_create_localhost( st = rrdset_create_localhost(
"system" "mem"
, "swap" , "swap"
, NULL , NULL
, "swap" , "swap"

View file

@ -317,7 +317,7 @@ modules:
- name: purgeable - name: purgeable
- name: speculative - name: speculative
- name: free - name: free
- name: system.swapio - name: mem.swapio
description: Swap I/O description: Swap I/O
unit: "KiB/s" unit: "KiB/s"
chart_type: area chart_type: area
@ -346,7 +346,7 @@ modules:
- name: load1 - name: load1
- name: load5 - name: load5
- name: load15 - name: load15
- name: system.swap - name: mem.swap
description: System Swap description: System Swap
unit: "MiB" unit: "MiB"
chart_type: stacked chart_type: stacked

View file

@ -465,7 +465,7 @@ modules:
alerts: alerts:
- name: 30min_ram_swapped_out - name: 30min_ram_swapped_out
link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
metric: system.swapio metric: mem.swapio
info: percentage of the system RAM swapped in the last 30 minutes info: percentage of the system RAM swapped in the last 30 minutes
os: "linux freebsd" os: "linux freebsd"
- name: oom_kill - name: oom_kill
@ -484,7 +484,7 @@ modules:
description: "" description: ""
labels: [] labels: []
metrics: metrics:
- name: system.swapio - name: mem.swapio
description: Swap I/O description: Swap I/O
unit: "KiB/s" unit: "KiB/s"
chart_type: area chart_type: area
@ -1340,7 +1340,7 @@ modules:
os: "linux" os: "linux"
- name: used_swap - name: used_swap
link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf link: https://github.com/netdata/netdata/blob/master/health/health.d/swap.conf
metric: system.swap metric: mem.swap
info: swap memory utilization info: swap memory utilization
os: "linux freebsd" os: "linux freebsd"
- name: 1hour_memory_hw_corrupted - name: 1hour_memory_hw_corrupted

View file

@ -1530,7 +1530,7 @@ netdataDashboard.context = {
info: 'Memory paged from/to disk. This is usually the total disk I/O of the system.' info: 'Memory paged from/to disk. This is usually the total disk I/O of the system.'
}, },
'system.swapio': { 'mem.swapio': {
info: '<p>System swap I/O.</p>'+ info: '<p>System swap I/O.</p>'+
'<b>In</b> - pages the system has swapped in from disk to RAM. '+ '<b>In</b> - pages the system has swapped in from disk to RAM. '+
'<b>Out</b> - pages the system has swapped out from RAM to disk.' '<b>Out</b> - pages the system has swapped out from RAM to disk.'
@ -1675,7 +1675,7 @@ netdataDashboard.context = {
info: 'System Random Access Memory (i.e. physical memory) usage.' info: 'System Random Access Memory (i.e. physical memory) usage.'
}, },
'system.swap': { 'mem.swap': {
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).' 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).'
}, },