On 07/28/2011 12:03 PM, Lou-adrien Fabre wrote: > Hi, > > I'm currently trying to monitor my container's stats from my host, using the > cgroup file (especialy cpuacct.usage_percpu), but the problem is that the > refresh rate of the cgroup file seems to be quit unstable. So i need to > watch for file modification and make my calculation then. I was thinking > about using inotify to watch files, but it seems that I'm not getting > notifed for any event while the file's content is actualy modified by lxc.
lxc does not modify the cgroup files and I think inotify is not supported by the cgroup. The cgroup should be monitored by the event feature: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/cgroups/cgroup_event_listener.c;h=3e082f96dc125333a2b32076710a23b78bc17c5f;hb=95b6886526bb510b8370b625a49bc0ab3b8ff10f I never used this feature, so I can not help more but I would be interested by any feedback if you are willing to try it and report your results :) Thanks -- Daniel ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel