This may be of interest.

https://lists.linuxfoundation.org/pipermail/containers/2012-May/029798.html 
<https://lists.linuxfoundation.org/pipermail/containers/2012-May/029798.html>

https://www.spinics.net/lists/cgroups/msg16842.html 
<https://www.spinics.net/lists/cgroups/msg16842.html>
https://github.com/lxc/lxcfs/issues/44 <https://github.com/lxc/lxcfs/issues/44>

so it doesn’t look like it will happen in base linux, but looks like lxc 
already does this.

> On Sep 12, 2018, at 6:03 PM, Wojciech S. Czarnecki <o...@fairbe.org> wrote:
> 
> On Tue, 11 Sep 2018 23:48:03 -0700 (PDT)
> Leigh McCulloch <leigh...@gmail.com> wrote:
> 
>> Hi,
>> 
>> Does anyone here know how Go interacts with memory limits inside
>> containers? (e.g. Kubernetes, Docker)
> 
> Real box info - parse /proc/meminfo
> Inside Docker: use stats via socket. Mount /var/run/docker.sock into your
> container
> and push docker stats over it then from Go read live data from it:
> 
> docker run -it -v /var/run/docker.sock:/var/run/docker.sock docker stats
> 
> See: https://docs.docker.com/config/containers/runmetrics/
> 
> IDNK current vmware, but eg Paralels containers can be run with /proc/meminfo
> virtualzed. i.e. giving info just about instance.
> 
>> Thanks,
>> Leigh
>> 
> 
> -- 
> Wojciech S. Czarnecki
> << ^oo^ >> OHIR-RIPE
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to