fastfetch-cli / fastfetch

A maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
11.03k stars 426 forks source link

Fastfetch doesn't display disk usage information #559

Closed EliasLucky closed 1 year ago

EliasLucky commented 1 year ago

Hello, that's nice to see how your project grows up and I wish you more success in the future. But anyways, I've found a little bug, and to be honest, I am not even sure that this bug can be related to your project, maybe this is something on my side because I've seen other images in which fastfetch was displaying disk usage information, and maybe I mis-configured something or idk.

General description of bug:

I have Arch Linux system installed on root ZFS filesystem pool.

The main thing is. Fastfetch, just doesn't display any disk usage information. Absolutely nothing, even there is no label "Disk" in fastfetch output.

I've tried to use env NO_CONFIG=1 fastfetch --structure Disk, but still nothing, only logo being displayed. And that's kinda weird.

Here is some information, that I think would be helpful about my filesystem configuration.

zfs list output:

NAME                    USED  AVAIL     REFER  MOUNTPOINT
zroot                   160G   289G       96K  none
zroot/ROOT             38.6G   289G       96K  none
zroot/ROOT/default     38.6G   289G     38.6G  /
zroot/data              122G   289G       96K  none
zroot/data/home         122G   289G      122G  /home
zroot/var              1.59M   289G       96K  /var
zroot/var/lib           336K   289G       96K  /var/lib
zroot/var/lib/docker     96K   289G       96K  /var/lib/docker
zroot/var/lib/libvirt   144K   289G      144K  /var/lib/libvirt
zroot/var/log          1.17M   289G     1.17M  /var/log

zpool list output: (there is like only one zfs pool, and it's called zroot)

zroot

ls /dev/disk/by-label/ output:

zroot

Often helpful information:

The content of the configuration file you use (if any)

--logo arch_small
--color cyan

--structure OS:Kernel:Packages:Shell:WM:Host:CPU:GPU:Memory:Disk

even with env NO_CONFIG=1 fastfetch --structure Disk --show-errors --stat --multithreading false --hide-curor false it displays nohting, no errors, only just arch logo.

Output of fastfetch --list-features:

threads
libpci
vulkan
wayland
xcb-randr
xcb
xrandr
x11
gio
dconf
dbus
zlib
xfconf
sqlite3
egl
glx
osmesa
libpulse
libnm

Here is command that I've tried with output below to take more details about this situation:

$ strace env NO_CONFIG=1 /usr/local/bin/fastfetch --multithreading false --structure Disk --pipe

Output:

execve("/usr/local/bin/fastfetch", ["/usr/local/bin/fastfetch", "--multithreading", "false", "--structure", "Disk", "--pipe"], 0x7fffd470a298 /* 43 vars */) = 0
brk(NULL)                               = 0x55b0dc9ab000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc463d70c0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=120199, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 120199, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb517d000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=965088, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb517b000
mmap(NULL, 966952, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb508e000
mmap(0x7f0bb509c000, 520192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f0bb509c000
mmap(0x7f0bb511b000, 385024, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8d000) = 0x7f0bb511b000
mmap(0x7f0bb5179000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xea000) = 0x7f0bb5179000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20:\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1961632, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2006640, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb4ea4000
mmap(0x7f0bb4ec6000, 1429504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f0bb4ec6000
mmap(0x7f0bb5023000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17f000) = 0x7f0bb5023000
mmap(0x7f0bb507b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d6000) = 0x7f0bb507b000
mmap(0x7f0bb5081000, 52848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0bb5081000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb4ea1000
arch_prctl(ARCH_SET_FS, 0x7f0bb4ea1740) = 0
set_tid_address(0x7f0bb4ea1a10)         = 2325828
set_robust_list(0x7f0bb4ea1a20, 24)     = 0
rseq(0x7f0bb4ea2060, 0x20, 0, 0x53053053) = 0
mprotect(0x7f0bb507b000, 16384, PROT_READ) = 0
mprotect(0x7f0bb5179000, 4096, PROT_READ) = 0
mprotect(0x55b0dac52000, 73728, PROT_READ) = 0
mprotect(0x7f0bb51cc000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f0bb517d000, 120199)          = 0
getrandom("\x9f\xe4\x54\xb4\xd7\x35\xcb\xc2", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x55b0dc9ab000
brk(0x55b0dc9cc000)                     = 0x55b0dc9cc000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3057504, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 3057504, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb4bb6000
close(3)                                = 0
getuid()                                = 1000
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=359, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=20, ...}, 0) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=359, ...}, AT_EMPTY_PATH) = 0
read(3, "# Name Service Switch configurat"..., 512) = 359
read(3, "", 512)                        = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=359, ...}, AT_EMPTY_PATH) = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1298, ...}, AT_EMPTY_PATH) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "root:x:0:0::/root:/bin/bash\nbin:"..., 1536) = 1298
close(3)                                = 0
uname({sysname="Linux", nodename="elias", ...}) = 0
readlink("/proc/self/exe", "/usr/local/bin/fastfetch", 8192) = 24
newfstatat(AT_FDCWD, "/home/elias/.config/", {st_mode=S_IFDIR|0700, st_size=27, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/elias/", {st_mode=S_IFDIR|0700, st_size=44, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/xdg/", {st_mode=S_IFDIR|0755, st_size=14, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/", {st_mode=S_IFDIR|0755, st_size=160, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/", {st_mode=S_IFDIR|0755, st_size=160, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/elias/.local/share/", {st_mode=S_IFDIR|0755, st_size=13, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/local/share", {st_mode=S_IFDIR|0755, st_size=6, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/elias/", {st_mode=S_IFDIR|0700, st_size=44, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/local/share/", {st_mode=S_IFDIR|0755, st_size=6, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/", {st_mode=S_IFDIR|0755, st_size=173, ...}, 0) = 0
uname({sysname="Linux", nodename="elias", ...}) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=359, ...}, 0) = 0
newfstatat(AT_FDCWD, "/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=53, ...}, 0) = 0
openat(AT_FDCWD, "/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=73, ...}, AT_EMPTY_PATH) = 0
read(3, "# Resolver configuration file.\n#"..., 512) = 73
read(3, "", 512)                        = 0
close(3)                                = 0
futex(0x7f0bb508834c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=53, ...}, AT_EMPTY_PATH) = 0
read(3, "# Generated by NetworkManager\nna"..., 512) = 53
read(3, "", 512)                        = 0
uname({sysname="Linux", nodename="elias", ...}) = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=53, ...}, AT_EMPTY_PATH) = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=120199, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 120199, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb517d000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libnss_mymachines.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=353160, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 353120, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb4b5f000
mmap(0x7f0bb4b66000, 229376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f0bb4b66000
mmap(0x7f0bb4b9e000, 77824, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3f000) = 0x7f0bb4b9e000
mmap(0x7f0bb4bb1000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x52000) = 0x7f0bb4bb1000
mmap(0x7f0bb4bb5000, 864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0bb4bb5000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 s\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=42992, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 45128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb4b53000
mmap(0x7f0bb4b56000, 20480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f0bb4b56000
mmap(0x7f0bb4b5b000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f0bb4b5b000
mmap(0x7f0bb4b5d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9000) = 0x7f0bb4b5d000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=727856, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 147912, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb4b2e000
mmap(0x7f0bb4b32000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7f0bb4b32000
mmap(0x7f0bb4b4d000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f000) = 0x7f0bb4b4d000
mmap(0x7f0bb4b51000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f0bb4b51000
close(3)                                = 0
mprotect(0x7f0bb4b51000, 4096, PROT_READ) = 0
mprotect(0x7f0bb4b5d000, 4096, PROT_READ) = 0
mprotect(0x7f0bb4bb1000, 12288, PROT_READ) = 0
prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1
prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
munmap(0x7f0bb517d000, 120199)          = 0
rt_sigprocmask(SIG_BLOCK, [HUP USR1 USR2 PIPE ALRM CHLD TSTP URG VTALRM PROF WINCH IO], [], 8) = 0
futex(0x7f0bb4bb4aec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/run/systemd/machines/elias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=120199, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 120199, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb517d000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib/libnss_resolve.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=149744, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 153912, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb4b08000
mmap(0x7f0bb4b0b000, 102400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f0bb4b0b000
mmap(0x7f0bb4b24000, 32768, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7f0bb4b24000
mmap(0x7f0bb4b2c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x23000) = 0x7f0bb4b2c000
close(3)                                = 0
mprotect(0x7f0bb4b2c000, 4096, PROT_READ) = 0
munmap(0x7f0bb517d000, 120199)          = 0
rt_sigprocmask(SIG_BLOCK, [HUP USR1 USR2 PIPE ALRM CHLD TSTP URG VTALRM PROF WINCH IO], [], 8) = 0
futex(0x7f0bb4b2d900, FUTEX_WAKE_PRIVATE, 2147483647) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = -1 ENOENT (No such file or directory)
close(3)                                = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=133, ...}, AT_EMPTY_PATH) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "# Static table lookup for hostna"..., 512) = 133
read(3, "", 512)                        = 0
close(3)                                = 0
ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0
rt_sigaction(SIGINT, {sa_handler=0x55b0dab8b3b0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0bb4eddab0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x55b0dab8b3b0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0bb4eddab0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x55b0dab8b3b0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f0bb4eddab0}, NULL, 8) = 0
openat(AT_FDCWD, "/proc/mounts", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(3, "proc /proc proc rw,nosuid,nodev,"..., 1024) = 1024
newfstatat(AT_FDCWD, "proc", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "sys", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "dev", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "run", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "efivarfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "zroot/ROOT/default", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "securityfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "tmpfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "devpts", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "cgroup2", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "pstore", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "bpf", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "systemd-1", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "hugetlbfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
read(3, "ugfs /sys/kernel/debug debugfs r"..., 1024) = 1024
newfstatat(AT_FDCWD, "debugfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "mqueue", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "tmpfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "tracefs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "configfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "ramfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "fusectl", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "ramfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "zroot/data/home", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "zroot/var/log", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "zroot/var/lib/docker", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/dev/sda1", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x1), ...}, 0) = 0
newfstatat(AT_FDCWD, "/dev/sda1", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x1), ...}, 0) = 0
openat(AT_FDCWD, "/dev/disk/by-label/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5
newfstatat(5, "", {st_mode=S_IFDIR|0755, st_size=60, ...}, AT_EMPTY_PATH) = 0
getdents64(5, 0x55b0dc9b4330 /* 3 entries */, 32768) = 80
newfstatat(AT_FDCWD, "/dev/disk/by-label/zroot", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x2), ...}, 0) = 0
getdents64(5, 0x55b0dc9b4330 /* 0 entries */, 32768) = 0
close(5)                                = 0
openat(AT_FDCWD, "/dev/disk/by-partlabel/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5
newfstatat(5, "", {st_mode=S_IFDIR|0755, st_size=80, ...}, AT_EMPTY_PATH) = 0
getdents64(5, 0x55b0dc9b4330 /* 4 entries */, 32768) = 136
newfstatat(AT_FDCWD, "/dev/disk/by-partlabel/EFI\\x20system\\x20partition", {st_mode=S_IFBLK|0660, st_rdev=makedev(0x8, 0x1), ...}, 0) = 0
close(5)                                = 0
statfs("/boot/efi", {f_type=MSDOS_SUPER_MAGIC, f_bsize=4096, f_blocks=153290, f_bfree=153234, f_bavail=153234, f_files=0, f_ffree=0, f_fsid={val=[0x801, 0]}, f_namelen=1530, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
read(3, "ramfs ro,nosuid,nodev,noexec,rel"..., 1024) = 337
newfstatat(AT_FDCWD, "ramfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "binfmt_misc", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "tmpfs", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "zroot/var/lib/libvirt", 0x7ffc463d6dc0, 0) = -1 ENOENT (No such file or directory)
read(3, "", 1024)                       = 0
close(3)                                = 0
newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}, AT_EMPTY_PATH) = 0
write(1, "\n", 1
)                       = 1
exit_group(0)                           = ?
+++ exited with 0 ++
EliasLucky commented 1 year ago

To be honest, even if this problem is on my side that's not a big problem for me, I still can try to make my own shell script, which will get string output from executing fastfetch and change it with adding disk usage information.

CarterLi commented 1 year ago

Thanks for reporting this, or we won't know this bug thus it won't get fixed.

Some information I need:

  1. cat /proc/mounts
  2. fastfetch -l none -s disk --disk-show-hidden --disk-show-subvolumes --disk-show-unknown
  3. fastfetch -l none -s disk --disk-folders /
EliasLucky commented 1 year ago

You're welcome, that's nice to hear that somehow I am helping this project grow up. Here is information that you needed. Ask me for whatever you want, if you want I can post strace output of executing "fastfetch -l none -s disk --disk-folders /".

Output of cat /proc/mounts :

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=3984332k,nr_inodes=996083,mode=755,inode64 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755,inode64 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
zroot/ROOT/default / zfs rw,nodev,relatime,xattr,posixacl 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12484 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,size=4000572k,nr_inodes=1048576,inode64 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
ramfs /run/credentials/systemd-tmpfiles-setup-dev.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
ramfs /run/credentials/systemd-sysctl.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
zroot/data/home /home zfs rw,nodev,relatime,xattr,posixacl 0 0
zroot/var/log /var/log zfs rw,nodev,relatime,xattr,posixacl 0 0
zroot/var/lib/docker /var/lib/docker zfs rw,nodev,relatime,xattr,posixacl 0 0
/dev/sda1 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
ramfs /run/credentials/systemd-tmpfiles-setup.service ramfs ro,nosuid,nodev,noexec,relatime,mode=700 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=800112k,nr_inodes=200028,mode=700,uid=1000,gid=1000,inode64 0 0
zroot/var/lib/libvirt /var/lib/libvirt zfs rw,nodev,relatime,xattr,posixacl 0 0

Output of fastfetch -l none -s disk --disk-show-hidden --disk-show-subvolumes --disk-show-unknown it just shows boot partition

Disk (/boot/efi): 224.00 KiB / 598.79 MiB (0%) - vfat [Hidden]

Output of fastfetch -l none -s disk --disk-folders / absolutely nothing, just empty line.

CarterLi commented 1 year ago

Thanks, that was helpful.

CarterLi commented 1 year ago

Please try the latest build. Please also paste output of fastfetch -s disk --format json here.

EliasLucky commented 1 year ago

I've tried to build fastfetch from latest dev branch, and tried to use env NO_CONFIG=1 ./fastfetch --structure Disk, and everything works fine, now it shows size of my mounted zfs datasets. now it shows my mounted zfs datasets size.

Disk (/): 38.33 GiB / 327.56 GiB (12%) - zfs [External]
Disk (/home): 122.03 GiB / 411.26 GiB (30%) - zfs [External]
Disk (/var/lib/docker): 128.00 KiB / 289.23 GiB (0%) - zfs [External]
Disk (/var/lib/libvirt): 256.00 KiB / 289.23 GiB (0%) - zfs [External]
Disk (/var/log): 1.25 MiB / 289.23 GiB (0%) - zfs [External]

Here is the output from ./fastfetch -s disk --format json :

[
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 310554001408,
          "free": 310554001408,
          "total": 351715590144,
          "used": 41161588736
        },
        "files": {
          "total": 606748821,
          "used": 197965,
          "filesystem": "zfs"
        },
        "mountpoint": "/",
        "mountFrom": "zroot/ROOT/default",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 627646464,
          "free": 627646464,
          "total": 627875840,
          "used": 229376
        },
        "files": {
          "total": 0,
          "used": 0,
          "filesystem": "vfat"
        },
        "mountpoint": "/boot/efi",
        "mountFrom": "/dev/sda1",
        "name": "EFI system partition",
        "type": [
          "Hidden"
        ]
      },
      {
        "bytes": {
          "available": 310554001408,
          "free": 310554001408,
          "total": 441584844800,
          "used": 131030843392
        },
        "files": {
          "total": 606852964,
          "used": 302108,
          "filesystem": "zfs"
        },
        "mountpoint": "/home",
        "mountFrom": "zroot/data/home",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310554001408,
          "free": 310554001408,
          "total": 310554132480,
          "used": 131072
        },
        "files": {
          "total": 606550862,
          "used": 6,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/docker",
        "mountFrom": "zroot/var/lib/docker",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310554001408,
          "free": 310554001408,
          "total": 310554263552,
          "used": 262144
        },
        "files": {
          "total": 606550890,
          "used": 34,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/libvirt",
        "mountFrom": "zroot/var/lib/libvirt",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310554001408,
          "free": 310554001408,
          "total": 310555312128,
          "used": 1310720
        },
        "files": {
          "total": 606550879,
          "used": 23,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/log",
        "mountFrom": "zroot/var/log",
        "name": "",
        "type": [
          "External"
        ]
      }
    ]
  }
]
CarterLi commented 1 year ago

Well, zpools other than zroot/ROOT/default should be detected as subvolumes. The problem is that I can't debug it...

And they should not be detected as external.

CarterLi commented 1 year ago

Please try it again. Noting subvolumes are hidden by default. You may show them with --disk-show-subvolumes

EliasLucky commented 1 year ago

Well how I understand it should just show only / volume information a.k.a zroot/ROOT/default, without showing any other datasets (subvolumes).

Well, I've tried to copy and build again latest github dev branch, and after doing env NO_CONFIG=1 ./fastfetch --structure Disk it still shows subvolumes and still shows them as external:

Disk (/): 38.33 GiB / 327.52 GiB (12%) - zfs [External]
Disk (/home): 122.07 GiB / 411.26 GiB (30%) - zfs [External]
Disk (/var/lib/docker): 128.00 KiB / 289.19 GiB (0%) - zfs [External]
Disk (/var/lib/libvirt): 256.00 KiB / 289.19 GiB (0%) - zfs [External]
Disk (/var/log): 1.25 MiB / 289.19 GiB (0%) - zfs [External]

with adding --disk-show-subvolumes a.k.a with env NO_CONFIG=1 ./fastfetch --structure Disk --disk-show-subvolumes is still the same result:

Disk (/): 38.33 GiB / 327.52 GiB (12%) - zfs [External]
Disk (/home): 122.07 GiB / 411.26 GiB (30%) - zfs [External]
Disk (/var/lib/docker): 128.00 KiB / 289.19 GiB (0%) - zfs [External]
Disk (/var/lib/libvirt): 256.00 KiB / 289.19 GiB (0%) - zfs [External]
Disk (/var/log): 1.25 MiB / 289.19 GiB (0%) - zfs [External]

Output from ./fastfetch -s disk --format json :

[
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 310513631232,
          "free": 310513631232,
          "total": 351675219968,
          "used": 41161588736
        },
        "files": {
          "total": 606669909,
          "used": 197965,
          "filesystem": "zfs"
        },
        "mountpoint": "/",
        "mountFrom": "zroot/ROOT/default",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 627646464,
          "free": 627646464,
          "total": 627875840,
          "used": 229376
        },
        "files": {
          "total": 0,
          "used": 0,
          "filesystem": "vfat"
        },
        "mountpoint": "/boot/efi",
        "mountFrom": "/dev/sda1",
        "name": "EFI system partition",
        "type": [
          "Hidden"
        ]
      },
      {
        "bytes": {
          "available": 310513631232,
          "free": 310513631232,
          "total": 441584713728,
          "used": 131071082496
        },
        "files": {
          "total": 606775653,
          "used": 303709,
          "filesystem": "zfs"
        },
        "mountpoint": "/home",
        "mountFrom": "zroot/data/home",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310513631232,
          "free": 310513631232,
          "total": 310513762304,
          "used": 131072
        },
        "files": {
          "total": 606471950,
          "used": 6,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/docker",
        "mountFrom": "zroot/var/lib/docker",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310513631232,
          "free": 310513631232,
          "total": 310513893376,
          "used": 262144
        },
        "files": {
          "total": 606471978,
          "used": 34,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/libvirt",
        "mountFrom": "zroot/var/lib/libvirt",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 310513631232,
          "free": 310513631232,
          "total": 310514941952,
          "used": 1310720
        },
        "files": {
          "total": 606471967,
          "used": 23,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/log",
        "mountFrom": "zroot/var/log",
        "name": "",
        "type": [
          "External"
        ]
      }
    ]
  }
]
CarterLi commented 1 year ago

I'm sorry that I pushed the commit to my fork repo by mistake. Please try it again

EliasLucky commented 1 year ago

Oh okay lol, no problem, gimme a sec.

EliasLucky commented 1 year ago

Now it works fine. With env NO_CONFIG=1 ./fastfetch --structure Disk it just shows information about zroot/ROOT/default dataset a.k.a ("/") volume. And recognizes this volume as external.

Disk (/): 38.33 GiB / 327.52 GiB (12%) - zfs [External]

With env NO_CONFIG=1 ./fastfetch --structure Disk --disk-show-subvolumes it shows information about zroot/ROOT/default dataset a.k.a ("/") volume, and also shows information about other subvolumes:

Disk (/): 38.33 GiB / 327.52 GiB (12%) - zfs [External]
Disk (/home): 122.07 GiB / 411.26 GiB (30%) - zfs [Subvolume]
Disk (/var/lib/docker): 128.00 KiB / 289.19 GiB (0%) - zfs [Subvolume]
Disk (/var/lib/libvirt): 256.00 KiB / 289.19 GiB (0%) - zfs [Subvolume]
Disk (/var/log): 1.25 MiB / 289.19 GiB (0%) - zfs [Subvolume]

Here is also output of ./fastfetch -s disk --format json if needed:

[
  {
    "type": "Disk",
    "result": [
      {
        "bytes": {
          "available": 310511534080,
          "free": 310511534080,
          "total": 351673122816,
          "used": 41161588736
        },
        "files": {
          "total": 606665917,
          "used": 197965,
          "filesystem": "zfs"
        },
        "mountpoint": "/",
        "mountFrom": "zroot/ROOT/default",
        "name": "",
        "type": [
          "External"
        ]
      },
      {
        "bytes": {
          "available": 627646464,
          "free": 627646464,
          "total": 627875840,
          "used": 229376
        },
        "files": {
          "total": 0,
          "used": 0,
          "filesystem": "vfat"
        },
        "mountpoint": "/boot/efi",
        "mountFrom": "/dev/sda1",
        "name": "EFI system partition",
        "type": [
          "Hidden"
        ]
      },
      {
        "bytes": {
          "available": 310511534080,
          "free": 310511534080,
          "total": 441584582656,
          "used": 131073048576
        },
        "files": {
          "total": 606771667,
          "used": 303715,
          "filesystem": "zfs"
        },
        "mountpoint": "/home",
        "mountFrom": "zroot/data/home",
        "name": "",
        "type": [
          "Subvolume"
        ]
      },
      {
        "bytes": {
          "available": 310511534080,
          "free": 310511534080,
          "total": 310511665152,
          "used": 131072
        },
        "files": {
          "total": 606467958,
          "used": 6,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/docker",
        "mountFrom": "zroot/var/lib/docker",
        "name": "",
        "type": [
          "Subvolume"
        ]
      },
      {
        "bytes": {
          "available": 310511534080,
          "free": 310511534080,
          "total": 310511796224,
          "used": 262144
        },
        "files": {
          "total": 606467986,
          "used": 34,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/lib/libvirt",
        "mountFrom": "zroot/var/lib/libvirt",
        "name": "",
        "type": [
          "Subvolume"
        ]
      },
      {
        "bytes": {
          "available": 310511534080,
          "free": 310511534080,
          "total": 310512844800,
          "used": 1310720
        },
        "files": {
          "total": 606467975,
          "used": 23,
          "filesystem": "zfs"
        },
        "mountpoint": "/var/log",
        "mountFrom": "zroot/var/log",
        "name": "",
        "type": [
          "Subvolume"
        ]
      }
    ]
  }
]
CarterLi commented 1 year ago

Now zpool volumes should not be detected as external disks.

EliasLucky commented 1 year ago

zpool volumes are not being detected as external disks. Except the main root ("/"). Everything works fine now, thank you for answering and fixing the issue!

CarterLi commented 1 year ago

Except the main root ("/").

What's the output? Do you have your system installed in a USB flash disk? If no, the root path should not be detected as external.