I was trying to execute this command
echo exec(\"top\");
and
echo exec(\"/usr/bin/top\");
neither works
I used:
$cpu = preg_split('/[\s]+/', shell_exec('mpstat 1 1')); $cpu = 100-$cpu[42];
100% minus the idle time.