LXC: ressources statistics

| 0 comments

0.00 avg. rating (0% score) - 0 votes

I wanted to find a way to properly view resources (memory/CPU/IO) usages or configuration. For that I need to use cgroups. But the problem are on free, top, htop or common any tools, as they do not get the real informations of the container.

We’re in fact waiting on a lot of work on the kernel side or systemd side. More information’s can be found here. Another solution that permit to bind a socks inside containers exists called CGManager, however classical tools doesn’t use it to get informations.

In waiting a real solution, I wrote all little script that give information’s regarding the container resources. It’s quick and dirty but make the job:

Regarding the code, here it is…simply read the cgroups information:

Hope this help some of you who didn’t know where to look at.

Author: Deimos

I'm a passionate DevOps. I love transmit my skills and I love working on high availability infrastructures/technologies.

Laisser une réponse