From 506ebbb9ee847812d1acc5d50aced0446c0e09d8 Mon Sep 17 00:00:00 2001 From: Zeb Piasecki Date: Sun, 23 Jul 2023 09:13:48 -0400 Subject: [PATCH] bug: display arc max size in arc usage instead of system memory --- src/app/data_harvester/memory/arc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/data_harvester/memory/arc.rs b/src/app/data_harvester/memory/arc.rs index e5342c9ba..b1eaae31b 100644 --- a/src/app/data_harvester/memory/arc.rs +++ b/src/app/data_harvester/memory/arc.rs @@ -18,7 +18,7 @@ pub(crate) fn get_arc_usage() -> Option { if let Some((label, value)) = line.split_once(' ') { let to_write = match label { "size" => &mut mem_arc, - "memory_all_bytes" => &mut mem_total, + "c_max" => &mut mem_total, _ => { continue; } @@ -45,7 +45,7 @@ pub(crate) fn get_arc_usage() -> Option { use sysctl::Sysctl; if let (Ok(mem_arc_value), Ok(mem_sys_value)) = ( sysctl::Ctl::new("kstat.zfs.misc.arcstats.size"), - sysctl::Ctl::new("hw.physmem"), + sysctl::Ctl::new("kstat.zfs.misc.arcstats.c_max"), ) { if let (Ok(sysctl::CtlValue::U64(arc)), Ok(sysctl::CtlValue::Ulong(mem))) = (mem_arc_value.value(), mem_sys_value.value())