[Lxc-users] cpuacct.usage update frequency

maxime louvel m.louvel at gmail.com
Wed Nov 17 15:54:57 UTC 2010


HI,

I'm trying to monitor the usage of an application (a video decoder) which is
alone in a cgroup (video_group).
The latter contains the subsystems : cpu, memory and cpuacct.usage.

I've tried to read cpuacct value with :
 - lxc-cgroup -n video_group cpuacct.usage
 - a fopen and fscanf of the file /cgroups/video_group/cpuacct.usage

I would like to account for the cpu time spent in decoding one frame, thus a
few milliseconds.

With both of my tries the value is not updated quickly enough and I get the
same value at the beginning and at the end of the decoding process.
If I use strace or gdb, then the value is changed. Hence my guess that the
update is not fast enough.

I would have expected to have the up to date value when accessing
cpuacct.usage through lxc-cgroup.

Do you know why this is not the case ?
Do you  know the best way to achieve what I want ?

cheers,

Maxime

-- 
Maxime Louvel
+33 6 89 70 33 47
3 rue charreton
38000 Grenoble
France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20101117/581e56c1/attachment.html>


More information about the lxc-users mailing list