Mpstat
Encyclopedia
mpstat is a computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 command-line software used in unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

-type operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s to report (on the screen) processor
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

 related statistics. It is used in computer monitoring in order to diagnose problems or for build statistics about a computer CPU usage.

Description

The mpstat command writes to standard output activities for each available processor
Central processing unit
The central processing unit is the portion of a computer system that carries out the instructions of a computer program, to perform the basic arithmetical, logical, and input/output operations of the system. The CPU plays a role somewhat analogous to the brain in the computer. The term has been in...

.

The mpstat command can be used both on SMP
Symmetric multiprocessing
In computing, symmetric multiprocessing involves a multiprocessor computer hardware architecture where two or more identical processors are connected to a single shared main memory and are controlled by a single OS instance. Most common multiprocessor systems today use an SMP architecture...

 and UP machines, but in the latter, only global average activities will be printed.

Usage


$ mpstat


Interval is the time in seconds between printing out a line of statistics.
Count is the number of lines of output you want.

It's very important to disregard the first line of output from mpstat (like iostat, vmstat
Vmstat
vmstat is a computer system monitoring tool that collects and displays summary information about operating system memory, processes, interrupts, paging and block I/O...

, etc.) as this line has unreliable information.

Examples

Example of output under linux:

$ mpstat
Linux 2.4.21-32.ELsmp (linux00) 07/04/07

10:26:54 CPU %user %nice %system %iowait %irq %soft %idle intr/s
10:26:54 all 0.07 0.00 0.16 8.48 0.00 0.09 91.18 165.49


under Solaris 8

$ mpstat
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 -43 -29 0 -1313 -1406 -769 -701 0 -20 0 -806 -112 -49 -10 -1889


under AIX 6

$ mpstat 1 1

System configuration: lcpu=8 ent=1.0 mode=Uncapped

cpu min maj mpc int cs ics rq mig lpa sysc us sy wa id pc %ec lcs
0 8 0 0 182 336 102 0 0 100 1434 38 51 0 12 0.02 1.8 185
1 0 0 0 11 5 5 0 0 - 0 0 19 0 81 0.00 0.1 12
2 0 0 0 1 0 0 0 0 - 0 0 42 0 58 0.00 0.0 0
3 0 0 0 1 0 0 0 0 - 0 0 43 0 57 0.00 0.0 0
4 0 0 0 1 0 0 0 0 - 0 0 45 0 55 0.00 0.0 0
5 0 0 0 1 0 0 0 0 - 0 0 44 0 56 0.00 0.0 0
6 0 0 0 1 0 0 0 0 - 0 0 2 0 98 0.00 0.0 0
7 0 0 0 53 5 5 0 0 - 0 0 66 0 34 0.00 0.2 54
U - - - - - - - - - - - - 0 99 0.99 99.0 -
ALL 8 0 0 251 346 112 0 0 100 1434 0 0 0 99 0.02 2.0 251

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK