How to Diagnose Linux Server Issues in the First 60 Seconds with 10 Essential Commands
This article explains how Netflix's performance team uses ten standard Linux command‑line tools—uptime, dmesg, vmstat, mpstat, pidstat, iostat, free, sar, and top—to quickly assess system health, resource saturation and errors within the first minute of a performance incident.
When a Linux server shows performance problems, the first minute is critical. Netflix's performance engineering team shares ten standard command‑line tools that reveal system health, resource saturation and errors.
1. uptime
uptimeThe command shows the system load averages for the past 1, 5 and 15 minutes, indicating how many tasks are waiting to run.
2. dmesg | tail
dmesg | tailDisplays the latest kernel messages, useful for spotting OOM kills or network errors.
3. vmstat 1
vmstat 1Shows virtual memory, CPU and I/O statistics every second; key fields include r (runnable tasks), free memory, si/so (swap activity) and us/sy/id/wa.
4. mpstat -P ALL 1
mpstat -P ALL 1Prints per‑CPU utilization, helping to identify single‑threaded bottlenecks.
5. pidstat 1
pidstat 1Reports CPU usage per process at regular intervals, allowing you to spot processes that consume many CPUs.
6. iostat -xz 1
iostat -xz 1Provides detailed block‑device statistics such as r/s, w/s, await and %util to detect disk saturation.
7. free -m
free -mShows total, used and free memory, buffers and cache; the “-/+ buffers/cache” line gives a more accurate view of usable memory.
8. sar -n DEV 1
sar -n DEV 1Monitors network interface throughput (rxkB/s, txkB/s) and interface utilization.
9. sar -n TCP,ETCP 1
sar -n TCP,ETCP 1Summarizes TCP activity: active/passive connections, retransmissions and packet errors.
10. top
topCombines many of the above metrics in a dynamic view; useful for a quick sanity check but may miss intermittent spikes.
By following the USE (Utilization, Saturation, Errors) methodology and checking these metrics in order, you can quickly narrow down the root cause of performance degradation.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.