On Tue, Jan 04, 2022 at 04:17:02AM -0800, Alexis Huxley wrote:
> Hi, inside an LXC container, /proc/meminfo:MemTotal corresponds with the
> container-specific restrictions, but /proc/meminfo:Shmem is the value from
> the host that the container runs on.
> Is this a bug or is it meant to be like this?
> The reason I ask is that CheckMK monitors the ratio between the two values
> and triggers an alert when a threshhold value is exceeded. On the host
> ('fiori' in the output below) and on containers that genuinely need a lot
> of memory then the ratio is always well below the threshold. But on one
> container ('mandala' in the output), which needs only a little memory, the
> ratio is high enough to trigger alerts.
> I understand that I can modify the CheckMK's threshold for this host, but
> before I do that I want to know whether (a) I should do thar or whether (b)
> I should submit an LXC bug report or whether (c) it's a fixed bug that just
> hasn't reached the distro I use (though googling didn't show that).
> Any advice please?
Did anyone ever answer this, in another forum?
From what I can see, the shmem reported by lxcfs should be the one which
came from cgroups, so it should not be the system-wide value.
> In case it helps: this is Debian 11 running stock LXC (4.0.6) and stock
> lxcfs (4.0.7).
> farfalle# *for HOST in fiori orzo armonie gnocchi paccheri mandala rotelle
> bigoli; do echo "=== $HOST ==="; echo; ssh -n $HOST "egrep
> '^(Shmem|MemTotal):' /proc/meminfo"; echo; done*
> You received this message because you are subscribed to the Google Groups "lxc-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lxc-users+...@lists.linuxcontainers.org
> To view this discussion on the web visit https://groups.google.com/a/lists.linuxcontainers.org/d/msgid/lxc-users/c89e4345-d3d0-40ed-83b0-c9abbb5dd910n%40lists.linuxcontainers.org