summaryrefslogtreecommitdiffstats
path: root/linux/Platform.c
diff options
context:
space:
mode:
authorMurloc Knight <murlockkinght@gmail.com>2020-09-22 18:54:15 +0700
committercgzones <cgzones@googlemail.com>2020-10-31 18:51:53 +0100
commitab17ef4dc0a306b7481cb47149b1c25f7f200932 (patch)
treee7e0c8de0788ec3d3a2f20ab0b510df1fc071c61 /linux/Platform.c
parent43d274a6179846e5dfaf1bd0b75b57f6e65a8e88 (diff)
Zram Meter feature
Diffstat (limited to 'linux/Platform.c')
-rw-r--r--linux/Platform.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/Platform.c b/linux/Platform.c
index fe9764ba..f7a768c9 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -42,6 +42,7 @@ in the source distribution for its full text.
#include "TasksMeter.h"
#include "UptimeMeter.h"
#include "XUtils.h"
+#include "ZramMeter.h"
#include "zfs/ZfsArcMeter.h"
#include "zfs/ZfsArcStats.h"
@@ -148,6 +149,7 @@ const MeterClass* const Platform_meterTypes[] = {
&PressureStallMemoryFullMeter_class,
&ZfsArcMeter_class,
&ZfsCompressedArcMeter_class,
+ &ZramMeter_class,
&DiskIOMeter_class,
&NetworkIOMeter_class,
&SELinuxMeter_class,
@@ -248,6 +250,13 @@ void Platform_setSwapValues(Meter* this) {
this->values[0] = pl->usedSwap;
}
+void Platform_setZramValues(Meter* this) {
+ const LinuxProcessList* lpl = (const LinuxProcessList*) this->pl;
+ this->total = lpl->zram.totalZram;
+ this->values[0] = lpl->zram.usedZramComp;
+ this->values[1] = lpl->zram.usedZramOrig;
+}
+
void Platform_setZfsArcValues(Meter* this) {
const LinuxProcessList* lpl = (const LinuxProcessList*) this->pl;

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