Hello, I am trying to collects statistics from LXC container externally. By externally, I mean without executing anything inside the container, but just grabbing all the informations from the outside.
Basically I am processing like that: Browse /var/lib/lxc to find containers name. For each containers name, check if the task group exist in /cgroups/ContainerName, if it exist, read all the cpu and memory stats etc. I see some issues with this approach like the fact that's just assume that LXC store informations in /var/lib/lxc or that I am just assuming how LXC name the task group. Also, how to get network statistics? First at all, many different network stack can be used (vetch, macvlan etc), then network namespace are not linked to cgroups, mean only LXC know the real association between interfaces and containers. I looked at the liblxc library, and no API seem to be there for helping at my task. Maybe I didn't got something, and I'am trying the wrong way while a trivial solution exist. Do you have any idea how I could reach my goal, I mean get the maximum statistics as possible with the best integration with LXC? I'am ready to patch LXC if necessary, I would like to have your concern before. regards, -- François-Xavier Bourlet ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel