Operations 35 min read

Diagnose Linux Performance in 60 Seconds: Essential Commands and Metrics Explained

This guide walks you through a rapid 60‑second Linux performance analysis, detailing key commands like uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar and top, and explains how to interpret their most important metrics for troubleshooting system issues.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Diagnose Linux Performance in 60 Seconds: Essential Commands and Metrics Explained

Linux 60‑second analysis

The following checklist works for any performance problem and reflects the typical steps taken within the first minute after logging into a sluggish Linux host. uptime – shows current time, system run time, logged‑in users and the three load‑average values (1, 5 and 15 minutes). dmesg | tail or cat /var/log/messages – displays the last kernel messages; look for errors that may affect performance. vmstat 1 – reports processes, memory, paging, block I/O, traps, CPU activity. Important columns: r (runnable processes), b (blocked), free, si/so (swap in/out), us, sy, id, wa, st. mpstat -P ALL 1 – breaks CPU time per core into user, nice, system, iowait, irq, softirq, steal, guest and idle percentages. pidstat 1 – shows CPU usage per process (user and system time) and helps identify the most demanding processes. iostat -xz – provides I/O statistics for each block device. Key fields: r/s, w/s, rkB/s, wkB/s, await (average response time), avgqu‑sz (average queue length) and %util (device utilization). free -m – displays memory usage in megabytes; check the available column to see how much RAM is truly free. sar -n DEV 1 – network device statistics (packets/second, kilobytes/second, errors, drops). sar -n SOCK 1 – socket usage (total, TCP, UDP, RAW sockets). sar -n TCP,ETCP 1 – TCP metrics such as active/passive connections, segments in/out, retransmissions and resets. top – interactive view of processes, CPU and memory usage; press t or m for visual graphs.

Key metric interpretations

Load average < 0.7 × CPU count → light load; > CPU count → high load, possible bottleneck. iowait high → CPU spends time waiting for disk I/O; investigate storage performance.

High retrans/s or orsts/s → network issues or remote host problems. %util > 60 % on a disk often degrades performance; near 100 % indicates saturation.

Sample command output

uptime
 11:14:26 up 16 min, 1 user, load average: 21.37, 18.64, 16.25
vmstat 1
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 1057540   2072 1761012   0   0    68    27 1501  595  8  4 87  1  0
mpstat -P ALL 1
 all   12.89  0.00  14.84  50.00  6.25  4.30  0.00  0.00  0.00 11.72
iostat -xz
 avg-cpu:  %user   %nice %system %iowait  %steal %idle
          10.78    0.00   36.46   20.39    0.00   32.37
Device            r/s   w/s   rkB/s   wkB/s  await  %util
nvme0n1         101.86 23.92 4143.65  729.07   4.35   64.21
top
%Cpu(s): 0.9 us, 1.1 sy, 0.0 ni, 96.8 id, 0.0 wa, 0.6 hi, 0.5 si, 0.0 st
When iostat reports 100 % utilization, the device is busy for the entire sampling interval; it may still accept more load if the underlying hardware can handle parallel requests.
Performance analysis diagram
Performance analysis diagram
CPU usage illustration
CPU usage illustration

By following this 60‑second checklist you can quickly pinpoint whether a problem lies in CPU saturation, memory pressure, I/O bottlenecks or network issues, and then dive deeper with the appropriate tools.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

MonitoringLinuxsysadminCommand-line
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.