[lxc-users] which container is swapping?

Harald Dunkel harald.dunkel at aixigo.de
Thu Jun 23 09:37:22 UTC 2016


Hi Guido,

I would be highly interested in your script.


Thanx in advance
Harri

On 06/21/16 15:54, Jäkel, Guido wrote:
> Dear Harald,
> 
> years ago I scripted my own lxc-free to be used as something lxc-aware inside the container. It's based on the memory controllers values, too. Please take a look at memory.stats, too. Here, I get other values to calculate the values for RSS+Cache, active, free and used RAM, too. 
> 
> It may act from outside (for all) or inside (for one) because I let bind-mount the containers cgroup to the container. I'm still using the old (legacy?) setup with one cgroup directory per container with all controllers attached to it (/cgroup/lxc/<container>/foo), therefore I just have to reach-in one directory via a calculated bind mount.
> 
> I'll may send you the script if you like. To be accurate, my current version just reports the "other" values for free/used memory. But this is just because I don't use swap space at all and you may easily add it  -- it's a diskless bladecenter and all filesystems are NFS. And to my knowledge, the only technical way to get swap on NFS is to loop-mount an image file - but this is an abstruse one.
> 
> Greetings
> 
> Guido
> 



More information about the lxc-users mailing list