Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

mpstat Cheatsheet

📅 2021-Jan-14 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ mpstat ⬩ 📚 Archive

The mpstat tool allows you to query and monitor statistics related to processors and its cores.

$ sudo apt install sysstat
$ mpstat -P ALL

Linux 4.4.0-17763-Microsoft (foobar)     01/14/21        _x86_64_        (4 CPU)

14:30:02     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
14:30:02     all    5.53    0.00    5.43    0.00    0.33    0.00    0.00    0.00    0.00   88.70
14:30:02       0    5.77    0.00    8.29    0.00    2.10    0.00    0.00    0.00    0.00   83.84
14:30:02       1    4.25    0.00    6.21    0.00    0.16    0.00    0.00    0.00    0.00   89.39
14:30:02       2    6.55    0.00    5.51    0.00    0.08    0.00    0.00    0.00    0.00   87.86
14:30:02       3    5.06    0.00    4.30    0.00    0.04    0.00    0.00    0.00    0.00   90.60
$ mpstat -P ALL -o JSON

Tried with: sysstat 11.6 and Ubuntu 18.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧