How to find the current CPU usage in Ubuntu – not the average

There are several ways to find the current CPU usage in Ubuntu. If you’re looking for real time statistics, simply use the “top” command. You can change the update rate using the -d argument to change it to a number of seconds between updates. The issue arises however if you’re trying to have a program get the current CPU usage. If you run top with the -n 1 argument to make it stop updating and just return the...

Read More