[Lxc-users] How make top, meminfo etc. to show the limits of the container?

Serge Hallyn serge.hallyn at canonical.com
Fri Jan 21 14:09:53 UTC 2011


Quoting atp (Andrew.Phillips at lmax.com):
> Hi,
> 
> Its not as simple as it seems. What you're asking for is to selectively
> hide or modify what gets shown to container processes by the /proc file
> system. In other words making /proc container aware. /proc is already
> partially there - with the pid namespace, but not for ram and cpus. 
> 
> We've tried a couple of approaches - FUSE based overlay file system etc
> - and at the last lxc dev call the way forward was proposed as being an
> in kernel file system integrated with the cgroups subsystem, bind
> mounted to the containers /proc.
> 
> At the moment, the containers I'm running adopt a far more hacky
> solution to this by patching the /proc filesystem itself. 
> 
> Patch for cpu limiting proc stat is at;
> http://www.tinola.com/lxc/

Sentiments in kernel community tend to change profoundly over any
3 year period.  I think it's worth floating patches like your proc
patch on lkml for review.

-serge




More information about the lxc-users mailing list