public function getCpuUsage()
{
$cpuUsage = str_replace(' ', '', `ps -A -o %cpu`);
$processes = explode("\n", $cpuUsage);
$cpuUsage = array_sum($processes);
if (self::getCpuCoreCount()) {
return $cpuUsage / self::getCpuCoreCount();
} else {
return 0;
}
}