On ubuntu the uptime string is ... load average: ...
On freebsd the uptime string is ... load averages: ...
Modified file functions.php and replaced getLoad() with
Code: Select all
function getLoad()
{
$uptime = shell_exec( 'uptime' );
$load = '';
if ( preg_match( '/load average: ([\d.]+)/', $uptime, $matches ) ){
$load = $matches[1];
}elseif(preg_match( '/load averages: ([\d.]+)/', $uptime, $matches ) ){
$load = $matches[1];
}
return( $load );
}