A lightweight terminal-based Linux monitoring tool for observing dirty memory, writeback activity and I/O pressure in real time.
The tool is designed for system engineers, performance analysts and advanced Linux users who need visibility into how memory-backed writes are flushed to disk and how this affects overall system behavior.
Memory pages that have been modified in RAM but not yet written to disk.
High dirty memory can indicate:
- Write-heavy workloads
- Delayed disk I/O
- Potential latency spikes during forced writeback
Pages actively being flushed from memory to disk.
Sustained writeback can indicate:
- Disk saturation
- Storage bottlenecks
- I/O contention with applications
Linux kernel metrics that show how often tasks are stalled waiting for I/O.
This helps correlate memory pressure with real system impact.
- Real-time terminal UI
- Tracks dirty pages and writeback volume
- Displays I/O pressure (PSI)
- Optional per-process disk write tracking
- No background daemon
- No network access
- Linux only
- Kernel with PSI support (5.0+ recommended)
/procand/sysinterfaces available
- Python 3.9+
- Linux kernel with writeback statistics enabled
Optional:
- Root privileges for per-process write attribution
Install dependencies:
pip install -r requirements.txtClone the repository:
git clone https://github.com/davidpty/dirty-writeback-monitor.git
cd dirty-writeback-monitorRun directly:
python dirtymonBasic monitoring:
python dirtymonRun with elevated privileges for per-process I/O:
sudo python dirtymonExit with Ctrl+C.
- Rising dirty memory + low writeback → disk not flushing yet
- High writeback + high PSI → storage bottleneck
- Low dirty + high PSI → I/O contention elsewhere
Use this tool alongside iostat, vmstat, or perf for deeper analysis.
- Diagnosing disk latency spikes
- Understanding memory writeback behavior
- Tuning dirty ratio and writeback kernel parameters
- Observing impact of heavy write workloads
- All data is read locally from the kernel
- No files are written
- No network access
MIT