btop
btop copied to clipboard
[BUG] Hard drive available size is wrong
A minor bug yes but it's annoying to pull out df every time i need an overview. This is the best system monitor and i hope it gets better!
Also another thing as you can see in the screenshot it only shows one GPU, its memory, usage and temps, I have 2 of them
Can you please fill out the bug template?
I can't reproduce this. Do you have some exotic setup for your filesystem?
I can't reproduce this. Do you have some exotic setup for your filesystem?
I could fill the template but I believe that screenshot is the best template you can have. On top is the btop, on the bottom is duf, a modernized version of df tool that shows the mounted drives size. On top in btop it shows that I have used 93.1 GiB on 3 drives that are actually empty, just mounted
The exotic setup consists of a drive being wiped and initialized as GPT. Then I encrypt it with cryptsetup with luksFormat and I use sha512. On boot those drives get unlocked automatically with crypttab and mounted to their set directories as EXT4 filesystem. They are mounted with UUID if this means something that I'm unaware of.
And here is the bug template (also I'm sorry for skipping it, I thought the screenshot would be sufficient):
Read the README.md and search for similar issues before posting a bug report!
README.md does not contain any info on why my empty drives show usage of 5% or 93.1 GiB
Any bug that can be solved by just reading the prerequisites section of the README will likely be ignored.
24-bit truecolor (See list of terminals with truecolor support)
256-color terminals are supported through 24-bit to 256-color conversion when setting "truecolor" to False in the options or with "-lc/--low-color" arguments.
16 color TTY mode will be activated if a real tty device is detected. Can be forced with "-t/--tty_on" arguments.
Wide characters (Are sometimes problematic in web-based terminals)
My terminal emulator does support 24-bit and 256-color terminals colors (not sure what truecolor even means, but I suspect this has nothing to do with my issue
Also needs a UTF8 locale and a font that covers:
Unicode Block “Braille Patterns” U+2800 - U+28FF (Not needed in TTY mode or with graphs set to type: block or tty.)
Unicode Block “Geometric Shapes” U+25A0 - U+25FF
Unicode Block "Box Drawing" and "Block Elements" U+2500 - U+259F
I do have UTF-8 locale setup on my system as to fonts, I am not sure and I don't want to look for these specifics since the vanilla works fine, also highly doubt that this has any issues with my problem
Optional Dependencies (Needed for GPU monitoring)
GPU monitoring also requires a btop binary built with GPU support (GPU_SUPPORT=true flag).
See GPU compatibility section for more about compiling with GPU support.
I have never compiled this program myself
NVIDIA
If you have an NVIDIA GPU you must use an official NVIDIA driver, both the closed-source and open-source ones have been verified to work.
In addition to that you must also have the nvidia-ml dynamic library installed, which should be included with the driver package of your distribution.
I do use a proprietary NVIDIA driver, I am fairly certain I have nvidia-ml library installed, proof, I got these: usr/lib/libnvidia-ml.so.550.78 usr/lib32/libnvidia-ml.so.550.78 usr/lib32/libnvidia-ml.so usr/lib32/libnvidia-ml.so.1
AMD If you have an AMD GPU rocm_smi_lib is required, which may or may not be packaged for your distribution. Notice (Text rendering issues) If you are having problems with the characters in the graphs not looking like they do in the screenshots, it's likely a problem with your systems configured fallback font not having support for braille characters. See Terminess Powerline for an example of a font that includes the braille symbols. See comments by @sgleizes https://github.com/aristocratos/bpytop/issues/100#issuecomment-684036827 and @XenHat https://github.com/aristocratos/bpytop/issues/100#issuecomment-691585587 in issue #100 for possible solutions. If text are misaligned and you are using Konsole or Yakuake, turning off "Bi-Directional text rendering" is a possible fix. Characters clipping in to each other or text/border misalignments is not bugs caused by btop, but most likely a fontconfig or terminal problem where the braille characters making up the graphs aren't rendered correctly. Look to the creators of the terminal emulator you use to fix these issues if the previous mentioned fixes don't work for you.`
Boy am I glad I have an NVIDIA card
Describe the bug
[A clear and concise description of what the bug is.]
The btop window on top of my previous screenshot shows my drives, those drives are named correctly but values shown are incorrect. I have 4 drives as shown in the picture below (left side). 3 of which are empty and only contain lost and found folder. Despite this btop shows that my drives (shown right) are occupied by data, reaching 5% of the total capacity or 93.1 GiB. I believe this is a bug and it would be nice if it could be fixed, my other minor brags about the second GPU not showing is and I believe obvious (shown on the second image below). I could imagine that you simply assumed everyone would have only one GPU in their system but as shown on the second image provided I do have 2 GPUs installed on my system.
To Reproduce
[Steps to reproduce the behavior:]
to reproduce this bug all I did is run btop, either as root or a peasant user step one: sudo btop // both bugs are present btop // both bugs are present
Expected behavior
[A clear and concise description of what you expected to happen.]
my expectations were that the drives would be shown correctly by btop and would show the correct values. As well as the second GPU that is nowhere to be found
Screenshots
[If applicable, add screenshots to help explain your problem.]
screenshots have been provided below the concise explanations of the issues mentioned (text above)
Info (please complete the following information):
- btop++ version:
btop --version
- If using snap:
snap info btop
- If using snap:
- Binary: [self compiled or static binary from release]
- Architecture: [x86_64, aarch64, etc.]
uname -m
- Platform: [Linux, FreeBSD, OsX]
- (Linux) Kernel:
uname -r
- (OSX/FreeBSD) Os release version:
- Terminal used:
- Font used:
btop version is: 1.3.2-1, found in the official archlinux repositories (repository 'extra') I have never used snap in my life binary has been downloaded from the official archlinux repositories (repository 'extra') on one of the following mirrors: Server = https://europe.mirror.pkgbuild.com/$repo/os/$arch Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch Server = https://at.arch.mirror.kescher.at/$repo/os/$arch Server = https://de.arch.mirror.kescher.at/$repo/os/$arch Server = https://mirror.sunred.org/archlinux/$repo/os/$arch Server = https://london.mirror.pkgbuild.com/$repo/os/$arch Server = https://mirror.osbeck.com/archlinux/$repo/os/$arch Server = https://mirror.theo546.fr/archlinux/$repo/os/$arch Server = https://mirror.moson.org/arch/$repo/os/$arch Server = https://md.mirrors.hacktegic.com/archlinux/$repo/os/$arch Server = https://mirror.f4st.host/archlinux/$repo/os/$arch Server = https://america.mirror.pkgbuild.com/$repo/os/$arch Server = https://archmirror.it/repos/$repo/os/$arch Server = https://mirror.ufscar.br/archlinux/$repo/os/$arch Server = https://seoul.mirror.pkgbuild.com/$repo/os/$arch Server = https://mirror.telepoint.bg/archlinux/$repo/os/$arch Server = https://archlinux.thaller.ws/$repo/os/$arch Server = https://sydney.mirror.pkgbuild.com/$repo/os/$arch Server = https://arch.mirror.constant.com/$repo/os/$arch Server = https://archlinux.uk.mirror.allworldit.com/archlinux/$repo/os/$arch I am fairly certain that this is a lot of mirrors but unfortunately I don't know which one is the one to blame I use x86_64 architecture platform is GNU/ Linux, to be precise I use the official Arch Linux downloaded from https://archlinux.org/download/ the terminal that I use is terminator, also found in the official Arch Linux repository (repository 'extra') the font that I use system-wide is: Source Code VF Black (size: 9)
Additional context
Contents of ~/.config/btop/btop.log
Note: The snap uses: ~/snap/btop/current/.config/btop
(try running btop with --debug
flag if btop.log is empty)
no such file exists on my system
GDB Backtrace
If btop++ is crashing at start the following steps could be helpful:
(Extra helpful if compiled with make OPTFLAGS="-O0 -g"
)
- run (linux):
gdb btop
(macos):lldb btop
-
r
to run, wait for crash and press enter if prompted, CTRL+L to clear screen if needed. - (gdb):
thread apply all bt
(lldb):bt all
to get backtrace for all threads - Copy and paste the backtrace here:
as much as I want to help you, if I did any of this I would just break even more of this program. I don't know how to use any of these tools
I could fill the template but I believe that screenshot is the best template you can have.
I mostly wanted you to fill out the system information 😆
I mostly wanted you to fill out the system information 😆 If I missed something I would be happy to provide more info
I can't still can't reproduce it here. I have btrfs on LUKS and it works like a charm
If I get the chance I'll look into other setups as well
@roda37 Set disk_free_priv
in the mem/disk settings true.
Regarding Gpu it's currently bugged. The second one might show up if you resize the window.
The current "drawing" system in btop will be getting revised at some point in the future when I have time. It's currently a bit hard to reason about and hard to add new parts to without understanding the whole.
I can't still can't reproduce it here. I have btrfs on LUKS and it works like a charm
btop
does not take into account the transparent compression that btrfs
applies (if enabled):
$ doas compsize -x /
Processed 1202016 files, 257034 regular extents (662859 refs), 804295 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 49% 10G 21G 49G
none 100% 5.5G 5.5G 13G
zstd 32% 5.2G 16G 35G
prealloc 100% 8.0M 8.0M 16M
The duf
tool that OP refered to, takes this into account. It would be nice if btop
would also take it into account so that i can use its Disk values and ditch duf
.
To avoid misunderstandings: the correct Disk Usage value to show in my case would be 10G
(the TOTAL row, Disk Usage column). Right now, btop
is showing the TOTAL row, Uncompressed column (which is the size the files would have if they were not compressed).
If you fix this, please make sure that other filesystems that provide transparent compression (zfs, bcachefs) are covered as well. I don't know if it's the same mechanism for all of them or if there is something else that has to be considered to make all of them work.
I just came searching to see if this bug with compressed filesystems had already been reported. I didn't know that zfs and bcachefs can also do transparent compression. I only recently discovered it in btrfs.