A lightweight and fast Linux bcache monitoring tool for real-time performance analysis, IO statistics, and cache diagnostics.
Perfect for homelabs, servers, and SSD + HDD cache setups.
- 📊 Real-time bcache statistics
- ⚡ Monitor SSD cache performance
- 💾 Analyze HDD + SSD hybrid setups
- 🧠 Simple CLI interface (no dependencies)
- 🔍 Detect IO bottlenecks
- 🐧 Works on all major Linux distributions
bcache is a Linux kernel block layer that allows using an SSD as a cache for slower HDDs.
This tool helps you monitor:
- Cache hit ratio
- IO throughput
- Device performance
- System bottlenecks
This curl downloads the file to the current path and makes it executable immediately:
curl -fsSL https://raw.githubusercontent.com/fabianschmeltzer/Linux-Bcache-Monitor/main/bcache-monitor -o ./bcache-monitor && chmod +x ./bcache-monitor- Version: 0.6.00
- Credits: by Fabian Schmeltzer
- AI note: This program was written with AI assistance and may contain errors. Please verify critical output and use this tool at your own risk.
- Bug reports: Please submit bugs and improvement suggestions via GitHub Issues: https://github.com/fabianschmeltzer/Linux-Bcache-Monitor/issues
- Legal note: This is not legal advice. Without an explicit open-source license, standard copyright rules generally apply; GitHub documents that public repositories without a license can be viewed and forked on GitHub, but broader use, distribution, or derivative works require an appropriate license or permission. For binding guidance, consult legal counsel.
- EFF: Cache efficiency from
Total Hits / (Total Hits + Total Misses). Low values indicate many accesses are not served by SSD cache. - DIRTY: Amount of data in cache that still needs to be written to the HDD/backing device. Especially important in writeback mode.
- MISS/HIT: Ratio of current misses per second to hits per second. Values around
1.0or higher mean at least as many requests bypass cache as are served by it. - LIVE HIT/s and MISS/s: Live per-second change rate of bcache counters.
- GRAPH: Red shows
MISS/s, green showsHIT/s;◆marks the newest point,•older points. - H/M current/avg/peak: Current value, window average, and peak value.
- MIX: Percentage share of current bcache events.
Mis miss share,His hit share. With no load, the tool showsMIX idlebecause percentages would be misleading. - Δ / DELTA: Comparison of current value with window average. If average is
0,n/ais shown. - HEALTH: Traffic-light assessment from efficiency, miss/hit ratio, and miss trend.
- SSD cache / Avail WB: Cache size and potentially available cache share for writeback, when readable from sysfs.
- HDD/backing: Size of the bcache block device and, if mounted, used/free filesystem space.
- WB target: Background writeback rate (
writeback_rate) reported by bcache in bytes/s. This is bcache's throttle/target rate and not necessarily identical to physical HDD I/O. - WB percent / WB running: Target share for dirty data and status indicating whether bcache background writeback is running.
- HDD write: Real backing-device write rate calculated from
/sys/block/<device>/statbetween two samples. Helps show whether dirty data is actually draining to HDD. - Docker DISK: Read and write rates from Docker
BlockIOdeltas since the last Docker refresh. The last calculated rate remains visible until a new Docker sample is available.
Reference sources: The Linux kernel documentation describes bcache sysfs values such as dirty_data, writeback_percent, writeback_rate, cache_available_percent, bucket_size, and nbuckets. GitHub Docs and Choose a License explain the legal baseline for repositories without a license.
This is not legal advice. The tool is provided without warranty; output may be incorrect, incomplete, or outdated. Independently verify critical values before production decisions. Without an explicit open-source license, standard copyright rules generally apply; public GitHub repositories may be viewed and forked under GitHub platform terms, but broader use, distribution, or derivative works require an appropriate license or permission.
by Fabian Schmeltzer
This program was written with AI assistance and may contain errors. Please report bugs at https://github.com/fabianschmeltzer/Linux-Bcache-Monitor/issues.
