-.TH MPSTAT 1 "SEPTEMBER 2015" Linux "Linux User's Manual" -*- nroff -*-
+.TH MPSTAT 1 "NOVEMBER 2016" Linux "Linux User's Manual" -*- nroff -*-
.SH NAME
mpstat \- Report processors related statistics.
.SH SYNOPSIS
-.B mpstat [ -A ] [ -u ] [ -V ] [ -I { SUM | CPU | SCPU | ALL } ] [ -P {
-.I cpu
-.B [,...] | ON | ALL } ] [
+.B mpstat [ -A ] [ -u ] [ -V ] [ -I {
+.I keyword
+.B [,...] | ALL } ] [ -o JSON ] [ -P {
+.I cpu_list
+.B | ON | ALL } ] [
.I interval
.B [
.I count
.IP -A
This option is equivalent to specifying
.BR "-u -I ALL -P ALL"
-.IP "-I { SUM | CPU | SCPU | ALL }"
+.IP "-I { keyword [,...] | ALL }"
Report interrupts statistics.
+Possible keywords are
+.BR SUM ,
+.BR CPU
+and
+.BR SCPU .
+
With the
.B SUM
keyword, the
therefore all the interrupts statistics are displayed.
.RE
.RE
-.IP "-P { cpu [,...] | ON | 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.
+.IP "-o JSON"
+Display the statistics in JSON (Javascript Object Notation) format.
+JSON output field order is undefined, and new fields may be added
+in the future.
+.IP "-P { cpu_list | ON | ALL }"
+Indicate the processors for which statistics are to be reported.
+.I cpu_list
+is a list of comma-separated values or range of values (e.g.,
+.BR 0,2,4-7,12- ).
+Note that processor 0 is the first processor, and processor
+.B all
+is the global average among all processors.
The
.B ON
keyword indicates that statistics are to be reported for every
.IR auto
(the latter is the default).
+Please note that the color (being red, yellow, or some other color) used to display a value
+is not indicative of any kind of issue simply because of the color. It only indicates different
+ranges of values.
+
+.IP S_COLORS_SGR
+Specify the colors and other attributes used to display statistics on the terminal.
+Its value is a colon-separated list of capabilities that defaults to
+.BR H=31;1:I=32;22:M=34;1:N=33;1:Z=33;22 .
+Supported capabilities are:
+
+.RS
+.TP
+.B H=
+SGR (Select Graphic Rendition) substring for percentage values greater than or equal to 75%.
+
+.TP
+.B I=
+SGR substring for CPU number.
+
+.TP
+.B M=
+SGR substring for percentage values in the range from 50% to 75%.
+
+.TP
+.B N=
+SGR substring for non-zero statistics values.
+
+.TP
+.B Z=
+SGR substring for zero values.
+.RE
+
.IP S_TIME_FORMAT
If this variable exists and its value is
.BR ISO
The
.B mpstat
command will use the ISO 8601 format (YYYY-MM-DD) instead.
+The timestamp will also be compliant with ISO 8601 format.
.SH EXAMPLES
.B mpstat 2 5