Operations 17 min read

Essential Linux Commands for Quick System Performance Diagnosis

When a Linux server shows performance issues, this guide walks you through the most important one‑minute metrics—using commands like uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar and top—to quickly pinpoint CPU, memory, I/O, and network bottlenecks.

Raymond Ops
Raymond Ops
Raymond Ops
Essential Linux Commands for Quick System Performance Diagnosis

When you encounter performance problems on a Linux server, the first minute of investigation should focus on a set of core system metrics.

Uptime

The uptime command shows the system's average load over the past 1, 5, and 15 minutes, indicating how many tasks are waiting to run or are blocked on I/O.

dmesg | tail

Running dmesg | tail displays the latest kernel messages, helping you spot out‑of‑memory kills, hardware errors, or network issues such as SYN flooding.

vmstat 1

vmstat 1

reports virtual memory and CPU statistics every second. Key fields include r (runnable tasks), free (free memory in KB), si/so (swap activity), and CPU time breakdown ( us, sy, id, wa, st ).

mpstat -P ALL 1

mpstat -P ALL 1

prints per‑CPU utilization, allowing you to see whether a single core is saturated, which often points to a single‑threaded workload.

pidstat 1

pidstat 1

provides per‑process CPU usage at regular intervals, making it easy to identify processes that consume many CPU cores (e.g., a Java process showing >1500% CPU on a 32‑core box).

iostat -xz 1

iostat -xz 1

shows block‑device performance. Important metrics are r/s, w/s, rkB/s, wkB/s (I/O load), await (average request latency), avgqu‑sz (queue length), and %util (device utilization).

free -m

free -m

reports memory usage. Pay attention to the buffers and cached columns and the adjusted line -/+ buffers/cache, which gives a more accurate view of truly used memory.

sar -n DEV 1

sar -n DEV 1

monitors network interface throughput (rxkB/s, txkB/s) and utilization, helping you determine whether network bandwidth is a limiting factor.

sar -n TCP,ETCP 1

sar -n TCP,ETCP 1

reports TCP statistics such as active connections, passive connections, and retransmissions, useful for assessing connection‑level load and potential network issues.

top

The top command provides a real‑time view of processes, CPU usage, memory consumption, and load averages, allowing you to verify whether the metrics observed with the previous tools have changed.

These commands together form a quick, one‑minute checklist for diagnosing Linux server performance problems.

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.

Performance MonitoringLinuxcommand-linesystem metrics
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

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.