summaryrefslogtreecommitdiffstats
path: root/collectors/proc.plugin/proc_meminfo.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-06 16:11:30 +0000
commitaa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 (patch)
tree941cbdd387b41c1a81587c20a6df9f0e5e0ff7ab /collectors/proc.plugin/proc_meminfo.c
parentAdding upstream version 1.37.1. (diff)
downloadnetdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.tar.xz
netdata-aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7.zip
Adding upstream version 1.38.0.upstream/1.38.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/proc.plugin/proc_meminfo.c')
-rw-r--r--collectors/proc.plugin/proc_meminfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/collectors/proc.plugin/proc_meminfo.c b/collectors/proc.plugin/proc_meminfo.c
index 2f390c653..6988c70e0 100644
--- a/collectors/proc.plugin/proc_meminfo.c
+++ b/collectors/proc.plugin/proc_meminfo.c
@@ -158,9 +158,11 @@ int do_proc_meminfo(int update_every, usec_t dt) {
unsigned long long MemCached = Cached + SReclaimable - Shmem;
unsigned long long MemUsed = MemTotal - MemFree - MemCached - Buffers;
// The Linux kernel doesn't report ZFS ARC usage as cache memory (the ARC is included in the total used system memory)
- MemCached += (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
- MemUsed -= (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
- MemAvailable += (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
+ if (!inside_lxc_container) {
+ MemCached += (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
+ MemUsed -= (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
+ MemAvailable += (zfs_arcstats_shrinkable_cache_size_bytes / 1024);
+ }
if(do_ram) {
{