Purpose
Collects and displays performance
statistics for all logical processors in the system.
Syntax
mpstat [
{ -d | -i | -s | -a | -h }
] [ -w ][ -OOptions ] [ -@ wparname]
[ interval [ count ]
]
mpstat [-X [-o filename]]
[interval[count]]
Restriction: The wparname parameter
is restricted to use inside workload partitions.
Description
The mpstat command
collects and displays performance statistics for all logical processors
in the system. Users can define both, the number of times the statistics
are displayed, and the interval at which the data is updated. When
the mpstat command is invoked, it displays
two sections of statistics. The first section displays the System
Configuration, which is displayed when the command starts and whenever
there is a change in the system configuration. The second section
displays the Utilization Statistics which are displayed in intervals
and at any time the values of these metrics are deltas from pervious
interval.
The following information is displayed in the system
configuration section:
- lcpu
- Indicates the number of online logical processors.
- ent
- Indicates the entitled processing capacity in processor units.
This information is displayed only when the partition type is shared.
- mode
- Indicates whether the partition processor capacity is capped or
uncapped allowing it to consume idle cycles from the shared pool.
Dedicated LPAR is capped or donating.
- rset
- Indicates the resource-set type (regular or exclusive) that is
associated with the WPAR.
This information is displayed only when there is a resource set that
is associated with the WPAR.
The performance statistics displayed by
mpstat are
listed below:
- CPU
- (All flags) Logical processor ID.
Note: The logical processor
ID that is associated with the resource set of a WPAR is prefixed by an asterisk
(*) when you run the mpstat command inside a WPAR with the -s or -@ flag.
- min
- (Default, -a flag) Minor page faults
(page faults with no IO).
- maj
- (Default, -a flag) Major page faults
(page faults with disk IO).
- mpcs
- (-a, -i flag)
Number of mpc send interrupts.
- mpcr
- (-a, -i flag)
Number of mpc receive interrupts.
- mpc
- (Only default) Total number of inter-processor calls .
- dev
- (-a, -i flag)
Number of device interrupts.
- soft
- (-a, -i flag)
Number of software interrupts.
- dec
- (-a, -i flag)
Number of decrementer interrupts.
- ph
- (-a, -i flag)
Number of phantom interrupts.
- int
- (Only default) Total number of interrupts.
- cs
- (Default, -a flag) Total number of context
switches.
- ics
- (Default, -a flag) Total number of involuntary
context switches.
- bound
- (-a, -d flag)
Total number of threads that are bound.
- rq
- (Default, -a, -d flag)
Run queue size.
- push
- (-a, -d flag)
Number of migrations due to starvation load balancing .
- S3pull
- (-a, -d flag) Number of migrations outside the scheduling affinity
domain 3 due to idle stealing.
- S3grd
- (-a, -d flag) Number of dispatches from global runqueue, outside
the scheduling affinity domain 3.
- mig
- (Only default) Total number of thread migrations (to another logical
processor).
- S0rd
- (-a, -d flag) The percentage of thread redispatches
within the same logical processor with scheduling affinity domain
0.
- S1rd
- (-a, -d flag) The percentage of thread redispatches
within the same physical processor or core with scheduling affinity
domain 1.
- S2rd
- (-a, -d flag)
The percentage of thread redispatches within the same chip set, but
not within the same processor core with scheduling affinity domain
2.
- S3rd
- (-a, -d flag)
The percentage of thread redispatches within the same MCM (multiple
chip module) , but not within the same chip set with scheduling affinity
domain 3.
- S4rd
- (-a, -d flag)
The percentage of thread redispatches on different MCMs within the
same CEC or Plane with scheduling affinity domain 4.
- S5rd
- (-a, -d flag)
The percentage of thread redispatches on a different CEC or Plane
with scheduling affinity domain 5.
- S3hrd
- (-a, -d flag)
The percentage of local thread dispatches on this logical processor.
- S4hrd
- (-a, -d flag)
The percentage of near thread dispatches on this logical processor.
- S5hrd
- (-a, -d flag)
The percentage of far thread dispatches on this logical processor.
- lpa
- (Only default) Logical processor affinity. The percentage of logical
processor re-dispatches within the scheduling affinity domain 3.
- sysc
- (Default, -a flag) Number of system
calls.
- us
- (Default, -a flag) The percentage of physical processor utilization
that occurred while executing at the user level (application).
- sy
- (Default, -a flag) The percentage of
physical processor utilization that occurred while executing at the
system level (kernel).
- wa
- (Default, -a flag) The percentage of
time that the logical processor was idle during which it had an outstanding
disk I/O request.
- id
- (Default, -a flag) The percentage of
time that the logical processor was idle and it did not have an outstanding
disk I/O request.
- pc
- (Default, -a flag, -h flag)
The number or fraction of physical processor consumed. It is displayed
in both a shared partition and a dedicated partition. For the default
flag in the dedicated partition, it is not displayed when both donation
and simultaneous multithreading are disabled.
The pc of
the cpuid U row represents the number of unused physical
processors.
- %ec
- (Default, -a flag) The percentage of
entitled capacity consumed by the logical processor. The %ec of
the ALL CPU row represents the percentage of entitled capacity consumed.
Because the time base over which this data is computed can vary, the
entitled capacity percentage can sometimes exceed 100%. This excess
is noticeable only with small sampling intervals. The attribute is
displayed only in a shared partition.
- ilcs
- (-a, -d, -h flag)
Number of involuntary logical processor context switches, displayed
only in shared partition. For the -h and -a flags,
it is also displayed in dedicated partition.
- vlcs
- (-a, -d, -h flag)
Number of voluntary logical processor context switches. Displayed
only in shared partition. For the -h and -a flags,
it is also displayed in dedicated partition.
- lcs
- (Default) Total number of logical processor context switches.
Displayed only in shared partition or when a dedicated partition is
donating.
- %idon
- (-a, -h flag)
Shows the percentage of physical processor utilization that occurs
while explicitly donating idle cycles. Displayed only in dedicated
partition that is donating.
- %bdon
- (-a, -h flag)
Shows the percentage of physical processor utilization that occurs
while donating busy cycles. Displayed only in dedicated partition
that is donating.
- %istol
- (-a, -h flag)
Shows the percentage of physical processor utilization that occurs
while the Hypervisor is stealing idle cycles. Displayed only in dedicated
partition.
- %bstol
- (-a, -h flag)
Shows the percentage of physical processor utilization that occurs
while the Hypervisor is stealing busy cycles. Displayed only in dedicated
partition.
- %nsp
- (-a, -d flag)
Shows the current average processor speed as a percentage of nominal
speed. Displayed only if the hardware uses SPURR.
The mpstat command
displays all the above statistics for every logical processor in the
partition. When running a shared partition, a special processor row
with the cpuid U can be displayed when the entitled
processing capacity has not entirely been consumed.
The mpstat command
also displays a special processor row with the cpuid ALL which
shows the partition-wide utilization. On that row, except for uncapped
partitions with current physical processor consumption above their
entitled capacity, the percentages are relative to the entitled processing
capacity. For dedicated partitions, the entitled processing capacity
is the number of physical processors. And for a WPAR , the processors present
in the associated resource set, if any, are indicated by asterisks
(*) only when the -s or -@ flag is used.
When
the -s flag is specified, the mpstat command
reports simultaneous multithreading utilization,
if it is enabled. This report displays the virtual processor engines
utilization and utilization of each thread (logical processor) associated
with the virtual processor engine.
If mpstat is
running in a dedicated partition and simultaneous multithreading is enabled, then only
the thread (logical processor) utilization is displayed.
If mpstat is
running on an interval based mode, then it would be average value
calculated per second.
Flags
Item |
Description |
-a |
Displays all the statistics. |
-d |
Displays detailed affinity and migration statistics
for AIX® threads and
dispatching statistics for logical processors. |
-i |
Displays detailed interrupts statistics. |
-s |
Displays simultaneous multithreading threads
utilization, this flag is available only when mpstat runs
in a simultaneous multithreading enabled partition. |
-h |
Displays pc and processor switches, with stolen
and donation statistics for dedicated partitions. |
-w |
Displays wide column output, switches to wide
output mode. Default is 80 column output mode. |
@ wparname |
Displays the statistics for the specified WPAR. |
-OOptions |
Specifies the command option. -O options=value...
Following
are the supported options:
- sortcolumn = Name of the metrics in the mpstat command
output
- sortorder = [asc|desc]
- topcount = Number of CPUs to be displayed in the mpstat command
sorted output
|
-X |
Generates the XML output. The default file name
is mpstat_DDMMYYHHMM.xml unless you specify a different file
name by using with the –o option. |
-o |
Specifies the file name for the XML output.
|
Note: - The -a, -d,
and -i flags implicitly turn on wide-column
output.
- Inside a WPAR, the -@ flag
reports statistics of all processors.
- Processor statistics that are displayed inside a WPAR is always system wide.
- Only -o option is allowed with -X option.
Parameters
Item |
Description |
interval |
Specifies the interval between the iterations.
If interval is not specified, just one snapshot
of metrics is displayed which actually reports the values from the
time system is up. If interval is specified,
the tool waits for that duration before printing the first set of
data. Each set of data is followed by a separation line, a line with
average values for each columns (except the processor, which is replaced
by ALL), followed by an empty line. |
count |
Specifies number of iterations. If interval is
specified and count is not specified then mpstat runs
infinitely. count can not be specified without
specifying interval. |
Examples
- To see the default set of utilization metrics, enter the following
command:
mpstat 1 1
- To see the default set of utilization metrics in wide display
mode, enter the following command:
mpstat –w 1 1
- To see the detailed dispatch & affinity metrics, enter the
following command:
mpstat –d 1 1
- To see the detailed interrupts report, enter the following command:
mpstat –i 1 1
- To see all the statistics, enter the following command:
mpstat –a 1 1
- To see simultaneous multithreading utilization,
enter the following command:
mpstat –s 1 1
- To see all the processor metrics of a WPAR, enter the following
command:
mpstat -@ wparname
Note: To
see all the processor metrics of a
WPAR inside the
WPAR, enter the following
command:
mpstat -@
- To see the sorted output for the column cs, enter the following
command:
mpstat -d -O sortcolumn=cs
- To see the list of the top 10 CPUs, enter the following command:
mpstat -a -O sortcolumn=min,sortorder=desc,topcount=10
Files
Item |
Description |
/usr/bin/mpstat |
Contains the mpstat command. |