Dynamic behaviour of CPU usage in System Information widget of pfsense
-
In System Information widget of pfsense 'CPU usage' gets updated automatically every 10 seconds. My question is where is the code that's modifying 'CPU usage' every 10 seconds.
What I have done so far:
Code that displays CPU usage is:
CPU usage
![left bar](./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif)![red bar](./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif)![gray bar](./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif)![right bar](./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif)
(Updating in 10 seconds)
When 'id=cpumeter' is removed, '(Updating in 10 seconds)' is displayed forever. If 'id=cpumeter' is not removed then '(Updating in 10 seconds)' is displayed for 10 seconds and then replaced by 2% or 3% (depending upon the cpu usage). The precentage gets modified every 10 seconds.
So I tried searching the code that is updating CPU usage every 10 seconds but couldn't find it. I think java script is updating CPU usage but not sure. How can I find the code that is updating the CPU usage every 10 seconds?