rkapl / btsdu Goto Github PK
View Code? Open in Web Editor NEWBtrfs Snapshot Disk Usage Analyzer
License: GNU General Public License v2.0
Btrfs Snapshot Disk Usage Analyzer
License: GNU General Public License v2.0
In my case btsdu has been killed because it took more than 16GB of RAM and 8GB of SWAP.
I compared freshly installed home directory 117MB with current state of it 112GB.
Thanks for so useful tool, it really helps to understand how much real space "eats" each snapshot! But when I try to launch tool on not readonly snapshot, I got the error:
ERROR: subvolume /mnt/btrfs/my-subvolume is not read-only
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: UnexpectedEof, error: "failed to fill whole buffer" }', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/btsdu-0.1.0/src/main.rs:164:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Can you please explain why this tool not works with readwrite snapshots, and is this possible to add this feature? Thanks!
Hi
Sometimes I get the following error message. But this does not happen with every snapshot, with some it works without problems.
$ RUST_BACKTRACE=full /root/.cargo/bin/btsdu -p /snapshot/20210107-0315-day /snapshot/20210108-0315-day
At subvol /snapshot/20210108-0315-day
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "item 1 does not exist" }', src/libcore/result.rs:1188:5
stack backtrace:
0: 0x555767c89bf3 - backtrace::backtrace::libunwind::trace::h8cc7bd6ef9eecc96
at /usr/src/rustc-1.41.1/vendor/backtrace/src/backtrace/libunwind.rs:88
1: 0x555767c89bf3 - backtrace::backtrace::trace_unsynchronized::h6d4579bff574314f
at /usr/src/rustc-1.41.1/vendor/backtrace/src/backtrace/mod.rs:66
2: 0x555767c89bf3 - std::sys_common::backtrace::_print_fmt::h90c5eb8ce5c21ab3
at src/libstd/sys_common/backtrace.rs:84
3: 0x555767c89bf3 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd925cae363a8eae6
at src/libstd/sys_common/backtrace.rs:61
4: 0x555767ca0d9d - core::fmt::write::h7f27f0f32a72efde
at src/libcore/fmt/mod.rs:1025
5: 0x555767c88f95 - std::io::Write::write_fmt::h248d5ddff30f2014
at src/libstd/io/mod.rs:1426
6: 0x555767c8b721 - std::sys_common::backtrace::_print::h998846397d49de77
at src/libstd/sys_common/backtrace.rs:65
7: 0x555767c8b721 - std::sys_common::backtrace::print::he55a1a23a73d03c9
at src/libstd/sys_common/backtrace.rs:50
8: 0x555767c8b721 - std::panicking::default_hook::{{closure}}::h80dc9a42e1547e54
at src/libstd/panicking.rs:193
9: 0x555767c8b433 - std::panicking::default_hook::h50769e30da5feef3
at src/libstd/panicking.rs:210
10: 0x555767c8bd9e - std::panicking::rust_panic_with_hook::hd0b3a149883f4cfb
at src/libstd/panicking.rs:471
11: 0x555767c8b94e - rust_begin_unwind
at src/libstd/panicking.rs:375
12: 0x555767ca33ce - core::panicking::panic_fmt::h2c5b80195dbe1b07
at src/libcore/panicking.rs:84
13: 0x555767ca0557 - core::result::unwrap_failed::ha1cca7cc6769da6a
at src/libcore/result.rs:1188
14: 0x555767c1cba2 - btsdu::main::h41c178f4c827c1ef
15: 0x555767c17d23 - std::rt::lang_start::{{closure}}::h9b5b1195b9277998
16: 0x555767c8b7e3 - std::rt::lang_start_internal::{{closure}}::h76f680a226ff04a4
at src/libstd/rt.rs:52
17: 0x555767c8b7e3 - std::panicking::try::do_call::h299dda570ebabcf7
at src/libstd/panicking.rs:292
18: 0x555767c8e30a - __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
19: 0x555767c7fab1 - std::panicking::try::hfaf428da211c915f
at src/libstd/panicking.rs:270
20: 0x555767c7fab1 - std::panic::catch_unwind::hf2e7b412691ed4fa
at src/libstd/panic.rs:394
21: 0x555767c7fab1 - std::rt::lang_start_internal::h3cc876a8b3f40e9c
at src/libstd/rt.rs:51
22: 0x555767c1d2b5 - main
23: 0x7f57c0ad409b - __libc_start_main
24: 0x555767c1619a - _start
25: 0x0 - <unknown>
I can't do much with it. Thought I leave the message here, maybe someone can say something about it. :-)
Best,
Markus
$ uname -r
4.19.0-13-amd64
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ dpkg --list | grep cargo
ii cargo 0.43.1-3~deb10u1 amd64 Rust package manager
$ dpkg --list | grep rust
ii libstd-rust-1.41:amd64 1.41.1+dfsg1-1~deb10u1 amd64 Rust standard libraries
ii libstd-rust-dev:amd64 1.41.1+dfsg1-1~deb10u1 amd64 Rust standard libraries - development files
ii rust-gdb 1.41.1+dfsg1-1~deb10u1 all Rust debugger (gdb)
ii rustc 1.41.1+dfsg1-1~deb10u1 amd64 Rust systems programming language
Hello,
as there is no COPYING file in the source directory, can you confirm that you provide your work under GPL-2.0 terms? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.