HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
291 stars 37 forks source link

[BUG] [DISK] [BUSYBOX] Entry is not detected #62

Closed HorlogeSkynet closed 4 years ago

HorlogeSkynet commented 4 years ago

Describe the bug On Alpine Linux, for instance, the Disk entry is left undetected. See https://github.com/HorlogeSkynet/archey4/commit/d676b0b2d58c4a4f0e6beefcfbd5456f0165a6ec#diff-e6076e0f8c9ab0586c8909ec8d6832beR67.

Additional context When fixing this (let's say with a simpler df -P -B M call and a proper columns parsing), we've to think about an optimized approach, as while checking for BTRFS mount-points, the second df call would also fail... Maybe this fix could be thought over while reworking Disk for #55.

ingrinder commented 4 years ago

If we stick with df, we should probably go with df -k -P, since that's about as much as we can do following the original UNIX specification (see here) and convert the 1024-byte blocks into a human readable size. That should give us the most compatibility with anything *NIX.

HorlogeSkynet commented 4 years ago

I think we will/should ; It's fast, relevant and pretty-well supported. So agreed :100: Although, as we will lose -l, it's definitely relevant to work this out during #55, with the upcoming ability to specify mount-points.

Note to myself : Maybe it's time to rework the way we invoke ps in Processes at the same time. Current best candidate : ps -eo comm. Header line will have to be ignored. --> + remove the behavior when "run as root" note in README. Fixed in aef1cd0bc89182005b088e8a127d6aa5648a67aa.

EDIT :

Note to myself (2) : Using -k will also fix the whole Disk usage as the current -B MB parameter is misused.

HorlogeSkynet commented 4 years ago

This will be indirectly fixed by #67 ; closing here.