[lxc-users] cpu, memory and IO statistics measuring from inside a container

Fabio Kung fabio.kung at gmail.com
Sat Mar 15 05:47:36 UTC 2014


On Fri, Mar 14, 2014 at 08:52:46AM +1300, Gavin Grieve [DATACOM] wrote:
> It sounds like something that should exist so if it doesn't yet, I'm quite keen to put some time into it.

Coincidence or not, we (at Heroku) have been exploring this area too.
There have been many similar discussions about the same topic already
(including some recent messages to this list), but no clear winners.
Yesterday I did a writeup of what I could find so far:

http://fabiokung.com/2014/03/13/memory-inside-linux-containers/

Stéphane and others were very kind to provide some very useful info
there as comments.


> -----Original Message-----
> From: lxc-users-bounces at lists.linuxcontainers.org [mailto:lxc-users-bounces at lists.linuxcontainers.org] On Behalf Of Serge Hallyn
> Sent: Friday, 14 March 2014 5:48 a.m.
> To: LXC users mailing-list
> Subject: Re: [lxc-users] cpu, memory and IO statistics measuring from inside a container
> 
> Quoting Flo (florian.engelmann at gmail.com):
> > Hi,
> > 
> > is there any way to measure statistics regarding cpu usage (load and
> > utilization) memory usage and block IO from inside a container? I was
> > not able to manage this topic. Is it possible to mount
> > /sys/fs/cgroup/cpuacct/lxc/<containername> to some place inside the
> 
> Sure.  For one thing you can just do
> 
> lxc.mount.auto = cgroup:mixed
> 
> to get the full cgroup trees  mounted inside the container.
> 
> > container??? Are there any collectd, statsd or Nagios plugins to get
> > some statistics?
> 
> Not yet that I know of.  Please let us know if you write some.
> 
> > Thank you for any help!
> > 
> > Regards,
> > Flo
> 
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
> 
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list