mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Sleep 5 seconds before returning CPU usage information. This lowers the CPU usage to 3% on my Nexcom.
This commit is contained in:
parent
1bab13d037
commit
ba31ab65b2
@ -1,5 +1,6 @@
|
||||
<?
|
||||
function cpu_usage() {
|
||||
sleep(5);
|
||||
return get_cpuusage(get_cputicks(), get_cputicks());
|
||||
}
|
||||
|
||||
@ -28,6 +29,7 @@ function get_uptime() {
|
||||
}
|
||||
|
||||
function get_cputicks() {
|
||||
sleep(5);
|
||||
$cputicks = explode(" ", `/sbin/sysctl -n kern.cp_time`);
|
||||
return $cputicks;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user