Hi,<br><br>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. ( while I'm modified when I personaly modify the file). I assume it has something to see with lxc's way of modifying does files, but it is out of my comprehension. Could someone give me an advice on this?<br>
<br>Thx in advance, <br>
Lou<br>
<br>ps: this is a unrelated issue, and less important, but it's kind of stressing me : I noticed that time computation using clock() (processor ticks) inside the container becomes false when cpu shared is used. per exemple if i'm using 2 container on one 1cpu a 100%, time calculated inside each container with a code like :<br>
<br>double duration; <br>    start = clock(); <br>    while(running==1)<br>    {<br>        finish = clock(); <br>        duration = ((double)(finish - start)) / CLOCKS_PER_SEC; <br>      <br>        if(duration >=1.0)<br>
        {    <br>            printf("1 second spent!"); <br>            start = clock();<br>        }<br>    }<br><br>will be wrong, actualy the message will pop every 2 second. I would appreciate to have some lightning about this as i don't understand what is going on with that, i guess it comes from the cpu scheduling process, but ...<br>