Skip to content

Commit 3fbbcbd

Browse files
committed
bug: display arc max size in arc usage instead of system memory
1 parent 0e8feca commit 3fbbcbd

File tree

1 file changed

+2
-2
lines changed
  • src/app/data_harvester/memory

1 file changed

+2
-2
lines changed

src/app/data_harvester/memory/arc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub(crate) fn get_arc_usage() -> Option<MemHarvest> {
1818
if let Some((label, value)) = line.split_once(' ') {
1919
let to_write = match label {
2020
"size" => &mut mem_arc,
21-
"memory_all_bytes" => &mut mem_total,
21+
"c_max" => &mut mem_total,
2222
_ => {
2323
continue;
2424
}
@@ -45,7 +45,7 @@ pub(crate) fn get_arc_usage() -> Option<MemHarvest> {
4545
use sysctl::Sysctl;
4646
if let (Ok(mem_arc_value), Ok(mem_sys_value)) = (
4747
sysctl::Ctl::new("kstat.zfs.misc.arcstats.size"),
48-
sysctl::Ctl::new("hw.physmem"),
48+
sysctl::Ctl::new("kstat.zfs.misc.arcstats.c_max"),
4949
) {
5050
if let (Ok(sysctl::CtlValue::U64(arc)), Ok(sysctl::CtlValue::Ulong(mem))) =
5151
(mem_arc_value.value(), mem_sys_value.value())

0 commit comments

Comments
 (0)