~ubuntu-branches/ubuntu/hoary/sysstat/hoary

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
.TH MPSTAT 1 "FEBRUARY 2004" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
mpstat \- Report processors related statistics.
.SH SYNOPSIS
.B mpstat [ -P {
.I cpu
.B | ALL } ] [ -V ] [
.I interval
.B [
.I count
.B ] ]
.SH DESCRIPTION
The
.B mpstat
command writes to standard output activities for each available processor,
processor 0 being the first one.
Global average activities among all processors are also reported.
The
.B mpstat
command can be used both on SMP and UP machines, but in the latter, only global
average activities will be printed.

The
.I interval
parameter specifies the amount of time in seconds between each report.
A value of 0 indicates that processors statistics are to be reported
for the time since system startup (boot).
The
.I count
parameter can be specified in conjunction with the
.I interval
parameter if this one is not set to zero. The value of
.I count
determines the number of reports generated at
.I interval
seconds apart. If the
.I interval
parameter is specified without the
.I count
parameter, the
.B mpstat
command generates reports continuously.

.SH REPORTS
The report generated by the
.B mpstat
command has the following format:

.B CPU
.RS
Processor number. The keyword
.I all
indicates that statistics are calculated as averages among all
processors.
.RE
.B %user
.RS
Show the percentage of CPU utilization that occurred while
executing at the user level (application).
.RE
.B %nice
.RS
Show the percentage of CPU utilization that occurred while
executing at the user level with nice priority.
.RE
.B %system
.RS
Show the percentage of CPU utilization that occurred while
executing at the system level (kernel). Note that this does not
include the time spent servicing interrupts or softirqs.
.RE
.B %iowait
.RS
Show the percentage of time that the CPU or CPUs were idle during which
the system had an outstanding disk I/O request.
.RE
.B %irq
.RS
Show the percentage of time spent by the CPU or CPUs to service interrupts.
.RE
.B %soft
.RS
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.
.RE
.B %idle
.RS
Show the percentage of time that the CPU or CPUs were idle and the system
did not have an outstanding disk I/O request.
.RE
.B intr/s
.RS
Show the total number of interrupts received per second by
the CPU or CPUs.
.RE
.RE

.SH OPTIONS
.IP "-P cpu | ALL"
Indicate the processor number for which statistics are to be reported.
.I cpu
is the processor number. Note that processor 0 is the first processor.
The
.I ALL
keyword indicates that statistics are to be reported for all processors.
.IP -V
Print version number and usage then exit.

.SH ENVIRONMENT
The
.B mpstat
command takes into account the following environment variable:

.IP S_TIME_FORMAT
If this variable exists and its value is
.BR ISO
then the current locale will be ignored when printing the date in the report header.
The
.B mpstat
command will use the ISO 8601 format (YYYY-MM-DD) instead.

.SH EXAMPLES
.B mpstat 2 5
.RS
Display five reports of global statistics among all processors at two second intervals.
.RE

.B mpstat -P ALL 2 5
.RS
Display five reports of statistics for all processors at two second intervals.

.SH BUGS
.I /proc
filesystem must be mounted for the
.B mpstat
command to work.

Only a few activities are supplied by the Linux kernel for each processor.

.SH FILES
.IR /proc
contains various files with system statistics.

.SH AUTHOR
Sebastien Godard (sysstat <at> wanadoo.fr)
.SH SEE ALSO
.BR sar (1),
.BR sadc (8),
.BR sa1 (8),
.BR sa2 (8),
.BR iostat (1),
.BR vmstat (8)

.I http://perso.wanadoo.fr/sebastien.godard/