calculate cpu utilization

How to Calculate CPU Utilization in Linux

Sometimes you may need to measure CPU usage or find CPU utilization in Linux. Here’s how to calculate CPU utilization in Linux.

How to Calculate CPU utilization in Linux

Here’s how to check CPU utilization in Linux. CPU usage is calculated using top command

$ top

You will see an output like the one below.

In it, you will see a line %Cpu(s)… This contains CPU utilization values. Among them CPU idle time = 81.7% (with id suffix after it).

CPU Utilization = 100 – CPU idle time

In our case,

CPU utilization = 100 – 81.7 = 18.3%

You can also use other utilities like mpstat, sar and iostat to find CPU utilization.

Hopefully, this article will help you calculate CPU utilization in Linux.


About Ubiq

Ubiq is a powerful dashboard & reporting platform for small & medium businesses. Build dashboards, charts & reports for your business in minutes. Get insights from data quickly. Try it for free today!