Linux/fsmon
fsmon: A Real-Time Btrfs I/O Monitor[edit | edit source]
fsmon is a Python-based terminal application for monitoring the I/O activity of Btrfs filesystems in real-time. It displays bandwidth and IOPS (input/output operations per second) statistics for all detected filesystems and their devices. The application is lightweight and efficient, using data from the Linux sysfs interface to minimise overhead.
Btrfs is a modern copy-on-write (CoW) filesystem designed for scalability and advanced data management features such as snapshots, RAID, and self-healing capabilities. fsmon complements these features by providing an easy way to monitor I/O performance in real-time.
While traditional I/O monitoring tools like iostat and iotop provide statistics for individual devices and processes, respectively, they lack the capability to aggregate data at the filesystem level. In contrast, fsmon consolidates statistics from all devices within a Btrfs filesystem, offering a comprehensive view of its overall activity.
Requirements[edit | edit source]
- Python 3.6 or higher.
- At least one mounted Btrfs filesystem.
- Sufficient permissions to access
/sys/fs/btrfs
and related devices in/sys/block
.
Usage[edit | edit source]
-h
or--help
: Display usage information.-v
or--version
: Display version.
To run fsmon:
# ./fsmon.py
Real-time Btrfs I/O monitor displaying read/write bandwidth and IOPS.
Up
/Down
arrow keys: Navigate between filesystems.q
/Q
: Quit the program.l
/L
: Toggle between filesystem labels and UUIDs.i
/I
: Switch between bandwidth and IOPS charts.
Terminal Size[edit | edit source]
The minimum terminal size for fsmon is roughly 73x32 (columns x rows) with 5 filesystems and 2 charts. A smaller terminal will omit the charts and only show the list of filesystems and their statistics. fsmon attempts to fit the charts side-by-side or stacked, depending on the available space.
Download[edit | edit source]
The fsmon source code is available at https://git.tnonline.net/Forza/fsmon