Sobes.tech
Junior — Middle

What methods can be used to monitor CPU load in a Linux system?

sobes.tech AI

Answer from AI

To monitor CPU load in Linux, you can use several tools:

  • top — an interactive utility showing current CPU load, processes, and resource usage.
  • htop — an improved version of top with a user-friendly interface (may require installation).
  • mpstat (from the sysstat package) — displays CPU load statistics per core.
  • vmstat — shows overall system statistics, including CPU load.
  • sar — collects and displays resource usage statistics, including CPU.
  • cat /proc/stat — manually view CPU load data.

Example of using top:

top

Example of using mpstat:

mpstat 1 5

(outputs CPU statistics every second, five times)