Capture and inspect historical system metrics with a lightweight command-line reporter. 29.04.2026 | reading time: 2 min Want to find when the system was busy last night or reproduce a transient CPU spike? Use `sar` to collect and report historical system statistics; it reads lightweight binary logs and prints focused summaries so the administrator can spot trends fast. Troubleshoot CPU spikes Run a quick live sample and read the numbers directly: ``` $ sar -u 1 3 Linux 5.11.0-27-generic (host) 04/29/26 _x86_64_ (4 CPU) 12:00:00 AM CPU %user %nice %system %iowait %steal %idle 12:00:01 AM all 5.00 0.00 2.00 0.50 0.00 92.50 12:00:02 AM all 6.00 0.00 1.50 0.25 0.00 92.25 12:00:03 AM all 4.50 0.00 2.25 0.25 0.00 93.00 Average: all 5.17 0.00 1.92 0.33 0.00 92.58 ``` Read the %user and %system columns to see where CPU time goes; a rising %iowait points to storage bottlenecks, and per-CPU detail appears with `-P` when needed. What else sar records Do more than CPU: use `-r` for memory statistics, `-b` for block device I/O, `-q` for run-queue and load averages, `-n` for network device metrics, and `-I` for interrupts; combine options and parse averages to build facts for incident reports or capacity planning. Read historical logs If data collection is enabled, `sar` reads daily binary files (commonly under "/var/log/sa/") so you can run `sar -f /var/log/sa/sa21` to inspect yesterday; enable the sysstat collector (cron or systemd timer) on servers to preserve those traces before they vanish. When sar is not enough Use `sar` for trends and lightweight history, but reach for `atop` or `perf` to capture per-process detail or `tcpdump` for deep network traces; combine `sar` output with small scripts to automate alert thresholds or archive long-term metrics. Next steps Try scheduling regular `sar` snapshots, parse the output in a script, and correlate spikes with application logs; keep exploring Linux performance tools and consider formalizing the skill set with certifications such as CompTIA Linux+ or LPIC-1, with intensive exam preparation available at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities troubleshooting infrastructure processes network