CPU Usage Percent – Python One-Liner for Load Average per CPU

Processor usage is 88%. But how do I get a number like this? For gurus, this Python one-liner prints CPU usage $ python3 -c “print(‘{:.0f}%’.format( float(‘$(cat /proc/loadavg)’.split()[0]) / float(‘$(nproc)’)*100 ) )” 12% The rest of us can read on how … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , | Comments Off on CPU Usage Percent – Python One-Liner for Load Average per CPU