Forrest logo
back to the mpstat tool

mpstat:tldr:9e249

mpstat: Display 5 reports, one by one, from a given processor, at 2 second intervals.
$ mpstat -P ${0} ${2} ${5}
try on your machine

The command "mpstat -P ${0} ${2} ${5}" is used to retrieve and display various statistics related to the CPU utilization of a multi-processor system.

Here's a breakdown of the command and its parameters:

  • "mpstat" is a command-line utility available in Linux/Unix systems that is used to monitor and report per-processor or per-socket statistics of the system's CPU usage.
  • "-P" is a parameter that specifies the processor number(s) or processor range for which statistics should be displayed.
  • "${0}", "${2}", and "${5}" are variables that specify the specific processors or processor ranges for which statistics should be obtained. The dollar sign ($) indicates that they refer to variables, and the numbers in curly braces ({}) represent the value or index of the variable.

For example, if the command is executed as "mpstat -P 0 2 5", it will display CPU utilization statistics for processors 0, 2, and 5 respectively.

Overall, the command provides insights into the CPU usage and performance metrics of specific processors or processor ranges in a multi-processor system.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mpstat tool