I have a PHP script:
$loads = sys_getloadavg();
$core_nums = trim(shell_exec("grep -P '^processor' /proc/cpuinfo|wc -l"));
$load = round($loads[0]/($core_nums)*100, 10);
I running this script each second using AJAX and setInterval for building CPU Load chart. But result of this PHP script updates only after 3 or more calls:
How can I get new data each second???