How to get overall CPU usage (e.g. 57%) on Linux [closed]
Take a look at cat /proc/stat grep ‘cpu ‘ /proc/stat | awk ‘{usage=($2+$4)*100/($2+$4+$5)} END {print usage “%”}’ EDIT please read comments before copy-paste this or using this for any serious work. This was not tested nor used, it’s an idea for people who do not want to install a utility or for something that works … Read more