Pages

Monday, September 2, 2013

Resource Management – MPSTAT ( CPU Statistics )

MPSTAT is another command which helps in analyzing the linux system and also in troubleshooting various CPU. mpstat mainly focus on the CPU.It provides various usu full information regarding the CPU.

The Main benefit with mpstat is it provides information per processor basics.

Basic Example

Dev:vx1379:djbs002-~ $ mpstat
Linux 2.6.18-348.el5xen (vx1379) 09/01/2013

10:58:49 PM CPU %user %nice %sys  %iowait  %irq   %soft   %steal  %idle   intr/s
10:58:49 PM  all    6.00    0.14   0.22   0.64      0.00     0.02    0.11     92.86  209.70

The columns give various level of information like

where CPU - Processor number.the “all” under it indicated that statistics are calculated as averages among all processors.

%user - Show the percentage of CPU utilization that occurred while executing at the user level (application).

%nice - Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.

%sys - Show the percentage of CPU utilization that occurred while executing at the system level
(kernel). Note that this does not include time spent servicing interrupts or softirqs.

%iowait - Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.

%irq - Show the percentage of time spent by the CPU or CPUs to service interrupts.

%soft - Show the percentage of time spent by the CPU or CPUs to service softirqs. A softirq (software interrupt) is one of up to 32 enumerated software interrupts which can run on multiple CPUs at once.

%steal - Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.

%idle - Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.

intr/s - Show the total number of interrupts received per second by the CPU or CPUs.

More To Come, Happy Learning :-)