Operations 19 min read

Essential Linux Commands to Diagnose Server Performance in the First 60 Seconds

When a Linux server shows performance issues, the Netflix performance engineering team recommends a set of ten standard command‑line tools—uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar (network and TCP), and top—to quickly assess system load, errors, resource saturation, and utilization within the critical first minute of investigation.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Essential Linux Commands to Diagnose Server Performance in the First 60 Seconds

The article presents a practical, 60‑second workflow for diagnosing Linux server performance problems using ten widely available command‑line utilities. It introduces the USE method—examining Utilization, Saturation, and Errors across CPU, memory, disk, and network resources—to focus the analysis.

1. uptime

$ uptime

Shows the system’s 1‑, 5‑, and 15‑minute load averages, indicating how many tasks are runnable or waiting for CPU and I/O. A sudden spike in the 1‑minute value compared to the 15‑minute average often signals the onset of a problem.

2. dmesg | tail

$ dmesg | tail

Displays the most recent kernel messages, helping to spot errors such as out‑of‑memory kills or TCP SYN floods that may be causing performance degradation.

3. vmstat 1

$ vmstat 1

Provides per‑second snapshots of processes, memory, swap, I/O, system activity, and CPU usage. Key fields include r (runnable tasks), free (free memory in KB), si/so (swap in/out), and CPU time percentages ( us , sy , id , wa , st ). High r relative to CPU count indicates saturation.

4. mpstat -P ALL 1

$ mpstat -P ALL 1

Shows per‑CPU utilization, allowing detection of uneven load distribution or a single‑threaded bottleneck.

5. pidstat 1

$ pidstat 1

Reports CPU usage per process at regular intervals, making it easy to identify processes that consume disproportionate CPU (e.g., a Java process showing >1500% indicates usage of many cores).

6. iostat -xz 1

$ iostat -xz 1

Displays detailed block‑device statistics. Important metrics are r/s , w/s , rkB/s , wkB/s (throughput), await (average I/O latency), avgqu‑sz (average queue length), and %util (device utilization). Values above 60% utilization or high await times suggest disk saturation.

7. free -m

$ free -m

Shows total, used, and free memory, as well as buffers and cache. The “‑/+ buffers/cache” line gives a more accurate view of memory actually available to applications.

8. sar -n DEV 1

$ sar -n DEV 1

Monitors network interface statistics such as rxkB/s and txkB/s to assess bandwidth usage and potential network bottlenecks. The %ifutil column indicates interface utilization.

9. sar -n TCP,ETCP 1

$ sar -n TCP,ETCP 1

Provides TCP‑level metrics: active/s (outbound connections), passive/s (inbound connections), and retrans/s (retransmissions). Elevated retransmissions can signal network instability or server overload.

10. top

$ top

Offers a real‑time view of processes, CPU usage, memory consumption, and load averages. It consolidates many of the metrics covered by the previous tools and helps verify whether the system state has changed since the earlier snapshots.

The article emphasizes iterating through these commands, noting which resources have been ruled out, and using the collected data to narrow down the root cause. It also warns that tools like top refresh quickly and may hide intermittent issues, so scrolling tools (e.g., vmstat or pidstat) are preferable for capturing trends.

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-lineServer Diagnostics
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

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.