Operations 14 min read

Master Linux Performance Monitoring: Essential Tools and Commands

This article provides a comprehensive guide to Linux performance monitoring, covering essential tools such as vmstat, iostat, dstat, iotop, pidstat, top/htop, netstat, ps, strace, perf, and advanced tracing utilities, with usage examples and interpretation of their output.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Performance Monitoring: Essential Tools and Commands

This document consolidates Linux performance analysis tools, originally inspired by Brendan Gregg's work, and serves as a reference for system observability, benchmarking, and tuning.

Basic Monitoring Tools

vmstat : Shows virtual memory, processes, CPU, and I/O statistics. Usage: vmstat interval times.

iostat : Reports CPU and device I/O statistics. Use iostat -x for extended device stats.

dstat : Displays CPU, disk I/O, network, and paging in a colorful, detailed format. Example: dstat -cdlmnpsy.

iotop : Real‑time disk I/O monitoring per process, similar to top. Non‑interactive mode: iotop -bod interval.

pidstat : Monitors resource usage of specific processes (CPU, memory, I/O). Example: pidstat -d interval.

top / htop : Interactive process viewers showing load, CPU, memory, swap, and per‑process details.

mpstat : Multiprocessor CPU statistics, e.g., mpstat -P ALL interval times.

netstat : Network connection and routing information. Common options: netstat -npl, netstat -rn, netstat -i.

ps : Displays current process states. Typical usage: ps aux or ps -ef | grep pattern.

strace : Traces system calls and signals of a program, useful for debugging.

uptime : Shows system uptime and load averages.

lsof : Lists open files and the processes using them.

Advanced Tracing and Profiling

perf : Kernel‑level profiling tool for hotspots, cache misses, and function‑level performance.

eBPF tools (bcc, perf‑tools, ktap) : Modern tracing frameworks that leverage BPF for kernel and user‑space instrumentation.

Flame Graphs : Visual representation of stack samples generated by perf or eBPF.

Reference Images

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-monitoringLinuxeBPFperfiostatvmstatsystem observability
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.