Operations 10 min read

Master Linux I/O Monitoring: iostat, iotop, sar, dstat, nmon & More

This guide introduces essential Linux I/O monitoring tools—including iostat, iotop, sar, dstat, nmon, Zabbix, and Cacti—explaining their installation, key commands, and how to interpret their output for effective system performance analysis.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux I/O Monitoring: iostat, iotop, sar, dstat, nmon & More

1. System Built-in Tools

1.1 iostat

iostat is part of the sysstat package and reports I/O statistics in kB/s. Use the following command to collect data every 2 seconds for 10,000 intervals: iostat -x -k 2 10000 Important fields:

rrqm/s and wrqm/s – number of read/write requests merged per second.

rsec/s and wsec/s – sectors read/written per second.

rKB/s and wKB/s – kilobytes read/written per second.

avgrq‑sz – average request size.

avgqu‑sz – average queue length (shorter is better).

await – average I/O request latency (including queue and service time). Values >5 ms may indicate a problem.

svctm – average service time per request.

%util – proportion of time the device was busy; values near 100 % suggest the device is saturated.

1.2 iotop

Install with yum install iotop. Example usage to display active I/O processes every second: iotop -d 1 -o Key options:

-o – show only processes doing I/O.

-b – batch mode for logging.

-n NUM – number of iterations.

-d SEC – delay between updates.

-p PID – monitor a specific PID.

-u USER – monitor processes of a specific user.

Common shortcuts:

←/→ – change sort column (default is I/O).

r – reverse sort order.

o – toggle I/O‑only view.

p – toggle process/thread view.

a – show accumulated I/O.

q – quit.

1.3 sar

Run with: sar -p -d 2 1000 Relevant metrics:

tps – total I/O requests per second (read + write).

rtps – read requests per second.

wtps – write requests per second.

bread – bytes read per second.

bwrtn – bytes written per second.

Alternative command for block I/O:

sar -b 2 1000

1.4 dstat

dstat is a versatile replacement for vmstat, iostat, netstat, nfsstat, and ifstat, providing colored, real‑time output.

Common options:

-c – CPU statistics.

-C – per‑CPU statistics (e.g., -C 0,1).

-d – disk I/O.

-n – network statistics.

-l – system load.

-m – memory usage.

-g – page statistics.

-p – process statistics.

-s – swap usage.

-r – I/O request statistics.

-y – overall system status.

--output FILE – write CSV output to FILE.

2. Monitoring Tools

2.1 nmon

Installation on Linux:

wget http://sourceforge.net/projects/nmon/files/download/nmon_x86_12a.zip/download
unzip download
yum install ld-linux.so.2 libncurses.so.5
chmod +x nmon_x86_rhel52
mv nmon_x86_rhel52 /usr/local/bin/nmon

Collect data every 10 seconds for 60 samples (10 minutes): nmon -s10 -c60 -f -m ./ Check the background process: ps -ef | grep -i nmon Analysis can be performed with nmon_analyser or by opening the generated CSV in Excel.

2.2 Zabbix

Zabbix provides ready‑made IOPS monitoring templates that can be imported directly, producing graphical dashboards.

2.3 Cacti

Cacti is a mature monitoring platform with downloadable IOPS templates. Typical deployment steps:

Unzip the template package.

Copy net-snmp_devio.xml to the Cacti resource directory.

Import all *_TMPL.xml files via the Cacti “Import Templates” interface.

Import net-snmp_devIO-Data_query.xml last.

Add the “ucd/net – Get Device I/O” data query to an SNMP‑enabled host.

Create graphs for the desired disk or memory devices.

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.

performancelinuxsysstatI/O Monitoring
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.