<img style="border: none; background:none; width: 0; height: 0;" src="https://share.polymail.io/v2/z/a/NWIxNmRhN2Q0MTIw/QIrniNOorBAPFCIpHW5alquPucR68af8nCH5hzjgb9rlOeJxl8ku2coGqLQ80JSTTX3RT8qIlp4BjzLAtDpPsaQiJdPd5Hgfo_AaMzblhACNX4jkBE2wTgnjgV0ciOxK_KfluEXZShZfVXruM7ej4tf0KZVfX1qhQCp9WnjM.png" alt="" width="0px" height="0px" border="0" /><div></div>
<div>Stéphane,</div><div><br></div><div>I just got time to do my work on lxcfs. Installed lxcfs running on a Ubuntu 14.04 box, installed version is 2.0.8. </div><div><br></div><div>I restarted one of our containers and “I think” I see wrong output when running `free` for example. </div><div><br></div><div>lxc-info shows 1GB of memory usage and `free` shows 24GB of memory usage which is the same as the host memory usage. Anything I could be missing ?</div><div><br></div><div>Short version of the process done would be:</div><div><br></div><div>- apt-get install lxcfs</div><div>- sudo init 0 (in container)</div><div>- lxc-start -n container-name -d <br><br>
</div><div>Best,</div>
<div id="psignature"><div>Martín</div></div>
<div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">On Thu, May 31, 2018 at 12:39 AM "Stéphane Graber" <stgraber@ubuntu.com> <<a href="mailto:"Stéphane Graber" <stgraber@ubuntu.com>">"Stéphane Graber" <stgraber@ubuntu.com></a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>On Wed, May 30, 2018 at 07:16:04PM -0700, Martín Fernández wrote:
<br>> Stéphane,
<br>>
<br>> Thank you very much for the quick reply!
<br>>
<br>> What are you are saying is pretty awesome! That would make it super easy to start using it. Is there any constraint in terms of what versions of LXC are supported ? I can run LXCFS with LXC 1.0.10 ?
<br>
<br>1.0.10 should be fine though we certainly don't have all that many users
<br>of that release now that it's two LTS ago :)
<br>
<br>In any case, it'll be safe to install LXCFS, then create a test
<br>container, confirm it behaves and if it does then start restarting your
<br>existing containers, if it doesn't, let us know and we'll try to figure
<br>out why.
<br>
<br>> In order to understand a little bit more about how LXCFS works, does LXCFS hook into LXC starting process and mount /proc/* files ?
<br>
<br>That's correct, LXCFS when installed will create a tree at
<br>/var/lib/lxcfs those files then get bind-mounted on top of the
<br>containers /proc/* files through a LXC startup hook.
<br>
<br>> Thank you very much again!
<br>>
<br>> Best,
<br>> Martín
<br>>
<br>> On Wed, May 30, 2018 at 10:52 PM "Stéphane Graber" < ">"Stéphane Graber" > wrote:
<br>>
<br>> >
<br>> >
<br>> >
<br>> > _______________________________________________
<br>> > lxc-users mailing list
<br>> > <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<br>> > <a href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a>
<br>> >
<br>> >
<br>> >
<br>> > On Wed, May 30, 2018 at 05:08:59PM -0700, Martín Fernández wrote:
<br>> > > Hello,
<br>> > >
<br>> > > We are using LXC to virtualize containers in multiple of our hosts. We
<br>> > have been running with LXC for a while now.
<br>> > >
<br>> > > We started adding monitoring tools to our systems and found the known
<br>> > issue that LXC containers show the host information on /proc/meminfo and
<br>> > /proc/cpuinfo.
<br>> > >
<br>> > > I found that LXCFS solves the problems mentioned above. What would be
<br>> > required to setup LXCFS in my hosts ? Would I need to reboot all the
<br>> > containers ? Do I need to restore my containers filesystem ? Is there any
<br>> > guide/documentation around it ?
<br>> > >
<br>> > > Thanks before hand!
<br>> > >
<br>> > > Best,
<br>> > > Martín
<br>> >
<br>> > Hey there,
<br>> >
<br>> > You should just need to install lxcfs and then any container you start
<br>> > or restart will be using it. There's no way to set it up against a
<br>> > running container, but there's also no need to restart all your
<br>> > containers immediately, you can slowly roll it out if that helps.
<br>> >
<br>> > And no changes needed to the containers, it gets setup automatically
<br>> > through a lxc hook when the container starts.
<br>> >
<br>> >
<br>> > --
<br>> > Stéphane Graber
<br>> > Ubuntu developer
<br>> > <a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br>> >
<br>> >
<br>> >
<br>
<br>--
<br>Stéphane Graber
<br>Ubuntu developer
<br><a href="http://www.ubuntu.com">http://www.ubuntu.com</a>
<br></p></div></blockquote></div><br></div>