Search This Blog

Thursday, May 27, 2010

How do I Find Out Linux CPU Utilization?

Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems.

Finding CPU utilization is one of the important tasks. Linux comes with various utilities to report CPU utilization. With these commands, you will be able to find out:
CPU utilization
Display the utilization of each CPU individually (SMP cpu)
Find out your system's average CPU utilization since the last reboot etc
Determine which process is eating the CPU(s)


[edit]
Old good top command to find out Linux cpu load

Top command to find out Linux cpu usage

Type the top command:
$ top


[edit]
Find Linux CPU utilization using mpstat and other tools

Please note that you need to install special package called sysstat to take advantage of following commands. This package includes system performance tools for Linux (Red Hat Linux / RHEL includes these tools by default).
apt-get install sysstat

Use up2date command if you are using RHEL:
up2date sysstat

No comments: