Kaydet (Commit) 522ee112 authored tarafından mertcelen's avatar mertcelen

Server cpu disk usage command updated.

üst 3c46ba60
......@@ -294,7 +294,7 @@ class OneController extends Controller
"free -t | awk 'NR == 2 {printf($3/$2*100)}'",
false
);
$cpu = server()->run("cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS=\"\" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'",false);
$cpu = substr(server()->run("grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}'",false),0,7);
// $cpu = server()->run("vmstat 1 1|tail -1|awk '{print $15}'", false);
// $cpu = 100 - intval($cpu);
} elseif (server()->type == "windows_powershell") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment