Skip to main content
usage: statbtrfs [-h] [-s | -w] [-i INTERVAL] [-m MAX_SCRUB_COUNT]
[-d EXCLUDE_RECENT_SCRUBBED_DAYS] [--scrub-command-lockout SCRUB_COMMAND_LOCKOUT]
[--color {auto,always,never}] [-V]
[pattern ...]

Check Btrfs filesystem status.

positional arguments:
pattern Patterns to filter btrfs mounts. Default="*"

options:
-h, --help show this help message and exit
-s, --scrub Issue scrub to all pools
-w, --watch Refresh every -i seconds while any scrub is running, then exit (never
starts scrubs)
-i, --interval INTERVAL
Interval for status check in seconds
-m, --max-scrub-count MAX_SCRUB_COUNT
Maximum number of scrubs running at the same time (0: one per CPU)
-d, --exclude-recent-scrubbed-days EXCLUDE_RECENT_SCRUBBED_DAYS
Exclude mounts scrubbed within this many days
--scrub-command-lockout SCRUB_COMMAND_LOCKOUT
Seconds to wait after starting a scrub before starting another
--color {auto,always,never}
Colour output: auto (default) on a terminal unless NO_COLOR is set
-V, --version show program's version number and exit

Exit status: 0 healthy; 1 problems found (device errors, scrub errors or missing devices); 2 the
check failed (no matching mounts, an unreadable filesystem, no root); 130 interrupted; 141 the
reader of stdout went away (| head).

Known limitation: when each btrfs command has to run through sudo, a missing btrfs shows as "Could not fetch
complete info … Skipping…" rather than "btrfs not found on PATH" (see docs/limitations.md).

Upgrading to 0.39 from 0.38:
- The embedded multiCMD is now 1.57. It runs whenever the installed multiCMD is older, so multiCMD itself need not be upgraded. On EL7 and EL8, stock pip 9.0.3 cannot upgrade multiCMD, so `pip3 install -U statbtrfs` fails there: use `pip3 install statbtrfs==0.39`, or upgrade pip first.
- Known: on EL7, btrfs-progs 4.9.1's scrub status is not read, so `-s` can say a scrub finished while it runs and the status columns stay `Never`. A checksum error still shows. Planned for 0.40.
- Faster command starts on Python 3.6 - 3.10, where the embedded multiCMD 1.57 imports only built-in
modules in the wrapper that puts each command in its own process group (about 7 ms to 3.5 ms of CPU
per command on Python 3.6.8). Nothing else about starting a command changes.

Upgrading to 0.38 from 0.37:
- multiCMD 1.56 or newer is required (the embedded copy is 1.56).
- An unreadable filesystem now prints only the note under the table, "Could not fetch complete info for
<mounts>. Skipping...". The three lines before it ("Could not parse btrfs show info.", "Output from btrfs
filesystem show was:" and the raw output) are gone.
- statbtrfs | head, or any reader that exits early, now ends quietly with exit 141 (128 + SIGPIPE)
instead of a BrokenPipeError traceback and exit 1.
- Ctrl-C outside -s and -w (say while btrfs hangs on a dying device) exits 130 quietly instead of a
traceback.
- -s and -w clear the screen with ESC[H ESC[J, so a long run no longer pushes tables into the scrollback of
terminals that treat ESC[2J that way.
- Library callers: find_btrfs_mounts() takes no argument and execute_command(s) lose wait=.

Install:
sudo pip install statbtrfs

Development:
pip install -r requirements-dev.txt
pytest # unit tests (offline)
pytest --cov=statbtrfs --cov-fail-under=85
pytest -m live # optional status-only smoke on a btrfs host (as root)

Metadata

Release files for statbtrfs 0.39

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statbtrfs 0.39
File Size Uploaded Provenance Actions
statbtrfs-0.39.tar.gz 55.1 kB Without provenance Details for statbtrfs-0.39.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for statbtrfs 0.39
File Interpreter ABI Platform Actions
statbtrfs-0.39-py3-none-any.whl Python 3 none any Details for statbtrfs-0.39-py3-none-any.whl

Total release size: 97.3 kB

Release files / statbtrfs-0.39.tar.gz

Download URL statbtrfs-0.39.tar.gz
Size 55.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7cb702dd43ef13e26156e3e542c68fbaf75a7ca19f183afef7ebdf1d15e221fa
BLAKE2b-256 checksum
How to use checksums
1d918c97483cf5d17fd06252b0934eb8120434148b18edddc676c4ab32d1ca55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / statbtrfs-0.39-py3-none-any.whl

Download URL statbtrfs-0.39-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0825533b6b909600948fcb854c1d6d5fdc177938d2c2310bbde3c4c441116559
BLAKE2b-256 checksum
How to use checksums
e805040d050d84cd5688820a62b488bfbb67c693edb86bb0fde0b44ef939094c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for statbtrfs 0.39

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page