Hello, I'm working on a LXC plugin for collectd (A system statistics collection daemon): http://collectd.org.
My goal is to get statistics on a container almost as if it was a real server. I have started to focus on RAM and CPU usage. I have carefully read the cgroups documentation in the kernel sources, as well as your mailing lists and relevent posts on the LKML. With the memory.stat getting memory usage was straightforward, I use: - cache: to get the amount of ram cached; - rss: to get the amount of ram used. However, I can't figure out how to (correctly) get the cpu usage. I was searching for something like the cpus lines of /proc/stats. The right file to get this kind of informations seemed to be cpuacct.stat. But to make values in this file change *a bit* I have to stress the cpu a lot in my container. I expected that this value will continously increase because of backgrounds jobs in my container (postfix, sshd, cron,...). How is cpuacct.stat calculated ? Can I use it to report CPU usage, like it is possible with /proc/stats ? Maybe I'm using the wrong file ? Best Regards -- Louis Opter ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users