Update perftool.php

This commit is contained in:
Namhyeon Go 2020-02-19 14:43:33 +09:00 committed by GitHub
parent afd3e5d566
commit 491116531f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@
if(!is_fn("get_cpu_idle")) {
function get_cpu_idle() {
$idle = 100.0;
$idle = false;
if(loadHelper("exectool")) {
$idle = floatval(trim(exec_command("top -n 1 | grep -i Cpu\(s\) | awk '{print \$8}'")));