summaryrefslogtreecommitdiffstats
path: root/usr/local/www/includes
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-11 21:42:20 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-11 21:42:20 +0000
commitba31ab65b248d0ae33093096ff256d3edb0e1469 (patch)
tree3281cdbdb1bec94602459d8bb55a4a2599c9bae9 /usr/local/www/includes
parent1bab13d037f07a121c853deded38912bdf8a108c (diff)
downloadpfsense-ba31ab65b248d0ae33093096ff256d3edb0e1469.zip
pfsense-ba31ab65b248d0ae33093096ff256d3edb0e1469.tar.gz
Sleep 5 seconds before returning CPU usage information. This lowers the CPU usage to 3% on my Nexcom.
Diffstat (limited to 'usr/local/www/includes')
-rw-r--r--usr/local/www/includes/functions.inc.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index 88465ab..90d49c8 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -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;
}
OpenPOWER on IntegriCloud