diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-03-03 19:48:30 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-03-15 22:34:14 +0100 |
commit | d9f2eacbc5b3fccf63b24944ce9a30d762baea3c (patch) | |
tree | 1d8f44915c8f06b305cf820c1bb4bef05ac01bd7 /linux/Platform.c | |
parent | a4173f52097fd78d0dab2e3296514e7dc7e54660 (diff) |
Linux: individually show shared memory
Shmem: Total memory used by shared memory (shmem) and tmpfs
Source: https://www.kernel.org/doc/Documentation/filesystems/proc.txt
Closes: #556
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index 8a4e27c7..052a29cb 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -287,7 +287,8 @@ void Platform_setMemoryValues(Meter* this) { this->values[0] = pl->usedMem > lpl->totalHugePageMem ? pl->usedMem - lpl->totalHugePageMem : pl->usedMem; this->values[1] = pl->buffersMem; this->values[2] = pl->cachedMem; - this->values[3] = pl->availableMem; + this->values[3] = pl->sharedMem; + this->values[4] = pl->availableMem; if (lpl->zfs.enabled != 0) { this->values[0] -= lpl->zfs.size; |