summaryrefslogtreecommitdiffstats
path: root/solaris/Platform.c
diff options
context:
space:
mode:
authorRoss Williams <ross@ross-williams.net>2019-07-08 02:43:39 +0000
committerRoss Williams <ross@ross-williams.net>2019-07-07 23:10:54 -0400
commitff6914e4ad4b78749bcee5471a33ef206b0a7d03 (patch)
treeee52492b916d1112df15cf7bbb52583384110b4f /solaris/Platform.c
parenta88d2e313df7f5f2b781d5b14ffe0e7710018c10 (diff)
ZFS arcstats for Solaris
Diffstat (limited to 'solaris/Platform.c')
-rw-r--r--solaris/Platform.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/solaris/Platform.c b/solaris/Platform.c
index a29fcb47..8084d1fd 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -17,6 +17,7 @@ in the source distribution for its full text.
#include "ClockMeter.h"
#include "HostnameMeter.h"
#include "UptimeMeter.h"
+#include "zfs/ZfsArcMeter.h"
#include "SolarisProcess.h"
#include "SolarisProcessList.h"
@@ -122,6 +123,7 @@ MeterClass* Platform_meterTypes[] = {
&RightCPUsMeter_class,
&LeftCPUs2Meter_class,
&RightCPUs2Meter_class,
+ &ZfsArcMeter_class,
&BlankMeter_class,
NULL
};
@@ -220,6 +222,23 @@ void Platform_setSwapValues(Meter* this) {
this->values[0] = pl->usedSwap;
}
+void Platform_setZfsArcValues(Meter* this) {
+ SolarisProcessList* spl = (SolarisProcessList*) this->pl;
+
+ this->total = spl->zfs.max;
+ this->values[0] = spl->zfs.MFU;
+ this->values[1] = spl->zfs.MRU;
+ this->values[2] = spl->zfs.anon;
+ this->values[3] = spl->zfs.header;
+ this->values[4] = spl->zfs.other;
+
+ // "Hide" the last value so it can
+ // only be accessed by index and is not
+ // displayed by the Bar or Graph style
+ Meter_setItems(this, 5);
+ this->values[5] = spl->zfs.size;
+}
+
static int Platform_buildenv(void *accum, struct ps_prochandle *Phandle, uintptr_t addr, const char *str) {
envAccum *accump = accum;
(void) Phandle;

© 2014-2024 Faster IT GmbH | imprint | privacy policy