From a93edde1a21e533472b5d443002032260b5bd066 Mon Sep 17 00:00:00 2001 From: Ross Williams Date: Sat, 6 Jul 2019 04:27:49 +0000 Subject: Support ZFS ARC stats on FreeBSD New meter displays same ARC stats as FreeBSD top(1). Can be extended to other platforms that support ZFS. Pulling kstat.zfs.misc.arcstats.c_max as the meter total, so the meter has a meaningful value to work up to. The Text meter displays, first, the maximum ARC size (Meter.total), then second, the total ARC used, using the difference between Meter.maxItems and Meter.curItems to "hide" the used value from the Bar and Graph drawing functions by using an index in Meter.values[] that is beyond curItems - 1, but less than maxItems - 1. --- freebsd/Platform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'freebsd/Platform.h') diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 1735e7e3..3dc7ebf2 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -44,6 +44,8 @@ void Platform_setMemoryValues(Meter* this); void Platform_setSwapValues(Meter* this); +void Platform_setZfsArcValues(Meter* this); + void Platform_setTasksValues(Meter* this); char* Platform_getProcessEnv(pid_t pid); -- cgit v1.2.3 From 613556faebd16325da8c9057c81f39a2410d803f Mon Sep 17 00:00:00 2001 From: Ross Williams Date: Tue, 3 Sep 2019 18:26:02 +0000 Subject: Support for ZFS Compressed ARC statistics --- freebsd/Platform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'freebsd/Platform.h') diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 3dc7ebf2..0268f2c6 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -46,6 +46,8 @@ void Platform_setSwapValues(Meter* this); void Platform_setZfsArcValues(Meter* this); +void Platform_setZfsCompressedArcValues(Meter* this); + void Platform_setTasksValues(Meter* this); char* Platform_getProcessEnv(pid_t pid); -- cgit v1.2.3