[lxc-users] Getting information about memory and cpu resources of an LXC container

Jäkel, Guido G.Jaekel at dnb.de
Tue Mar 25 12:49:43 UTC 2014


Dear David,

In short: Currently not, but there is work in progress.


Greetings

Guido

>-----Original Message-----
>From: lxc-users-bounces at lists.linuxcontainers.org [mailto:lxc-users-bounces at lists.linuxcontainers.org] On Behalf Of David
>Shwatrz
>Sent: Tuesday, March 25, 2014 1:42 PM
>To: LXC users mailing-list
>Subject: [lxc-users] Getting information about memory and cpu resources of an LXC container
>
>Hi,
>
>I hade added a limit of 512 M and using only CPU #0 in an LXC container
>config file:
>lxc.cgroup.memory.limit_in_bytes = 512M
>lxc.cgroup.cpuset.cpus = 0
>
>Now, from within the container, cat /proc/meminfo and cat
>/proc/cpuinfo, as well as free(), will
>show infromation about the host, not about the container.
>
>Is the only way to retrieve that information about the memory assigned to
>a container and the CPU(s) assigned to it, from within the container, is by:
>
>cat  /sys/fs/cgroup/memory/lxc/fedora/memory.limit_in_bytes
>
>and
>cat   /sys/fs/cgroup/cpuset/lxc/fedora/cpuset.cpus
>
>Or is some other way to get that information ?
>
>BR,
>DavidSD
>_______________________________________________
>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