Closed borestad closed 3 weeks ago
Please try strace fastfetch -l none -s none
. When the process blocks, Ctrl+C
and paste the output here.
It would be better if you can use lurk: https://github.com/JakWai01/lurk/releases/tag/v0.3.9
lurk -T fastfetch -l none -s none
Hi!
Did a lurk, and added timestamps
❯❯ ets lurk -T fastfetch -l none -s none
0.003s ┃ [3691918] execve("", "", "") = 0 <0ns>
0.003s ┃ [3691918] brk(0x0) = 0x555555756000 <21053ns>
0.003s ┃ [3691918] mmap(0x0, 8192, 3, 34, 4294967295, 0) = 0x7FFFF7FC3000 <32207ns>
0.003s ┃ [3691918] access("/etc/ld.so.preload", 4) = -2 <18129ns>
0.003s ┃ [3691918] openat(4294967196, "/etc/ld.so.cache", 524288) = 3 <20476ns>
0.004s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD380, 4096) = 0 <21563ns>
0.004s ┃ [3691918] mmap(0x0, 37070, 1, 2, 3, 0) = 0x7FFFF7FB9000 <45646ns>
0.004s ┃ [3691918] close(3) = 0 <24485ns>
0.004s ┃ [3691918] openat(4294967196, "/lib/x86_64-linux-gnu/libc.so.6", 524288) = 3 <28085ns>
0.004s ┃ [3691918] read(3, "ELF\u0002\u0001\u0001\u0003", 832) = 832 <13746ns>
0.004s ┃ [3691918] pread64(3, "\u0006", 784, 64) = 784 <182338ns>
0.004s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD380, 4096) = 0 <20537ns>
0.004s ┃ [3691918] pread64(3, "\u0006", 784, 64) = 784 <39509ns>
0.004s ┃ [3691918] mmap(0x0, 1970000, 1, 2050, 3, 0) = 0x7FFFF7DD8000 <29325ns>
0.005s ┃ [3691918] mmap(0x7FFFF7DFE000, 1396736, 5, 2066, 3, 155648) = 0x7FFFF7DFE000 <38198ns>
0.005s ┃ [3691918] mmap(0x7FFFF7F53000, 339968, 1, 2066, 3, 1552384) = 0x7FFFF7F53000 <18870ns>
0.005s ┃ [3691918] mmap(0x7FFFF7FA6000, 24576, 3, 2066, 3, 1892352) = 0x7FFFF7FA6000 <27665ns>
0.005s ┃ [3691918] mmap(0x7FFFF7FAC000, 53072, 3, 50, 4294967295, 0) = 0x7FFFF7FAC000 <27921ns>
0.005s ┃ [3691918] close(3) = 0 <19746ns>
0.005s ┃ [3691918] openat(4294967196, "/lib/x86_64-linux-gnu/libm.so.6", 524288) = 3 <23951ns>
0.005s ┃ [3691918] read(3, "ELF\u0002\u0001\u0001\u0003", 832) = 832 <13573ns>
0.005s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD360, 4096) = 0 <20933ns>
0.005s ┃ [3691918] mmap(0x0, 909560, 1, 2050, 3, 0) = 0x7FFFF7CF9000 <27951ns>
0.005s ┃ [3691918] mmap(0x7FFFF7D09000, 471040, 5, 2066, 3, 65536) = 0x7FFFF7D09000 <42885ns>
0.005s ┃ [3691918] mmap(0x7FFFF7D7C000, 368640, 1, 2066, 3, 536576) = 0x7FFFF7D7C000 <52444ns>
0.005s ┃ [3691918] mmap(0x7FFFF7DD6000, 8192, 3, 2066, 3, 901120) = 0x7FFFF7DD6000 <26065ns>
0.006s ┃ [3691918] close(3) = 0 <26248ns>
0.006s ┃ [3691918] openat(4294967196, "/lib/x86_64-linux-gnu/libdl.so.2...", 524288) = 3 <25555ns>
0.006s ┃ [3691918] read(3, "ELF\u0002\u0001\u0001", 832) = 832 <30254ns>
0.006s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD340, 4096) = 0 <147180ns>
0.006s ┃ [3691918] mmap(0x0, 16400, 1, 2050, 3, 0) = 0x7FFFF7CF4000 <39947ns>
0.006s ┃ [3691918] mmap(0x7FFFF7CF5000, 4096, 5, 2066, 3, 4096) = 0x7FFFF7CF5000 <62861ns>
0.007s ┃ [3691918] mmap(0x7FFFF7CF6000, 4096, 1, 2066, 3, 8192) = 0x7FFFF7CF6000 <33605ns>
0.007s ┃ [3691918] mmap(0x7FFFF7CF7000, 8192, 3, 2066, 3, 8192) = 0x7FFFF7CF7000 <51197ns>
0.007s ┃ [3691918] close(3) = 0 <20146ns>
0.008s ┃ [3691918] openat(4294967196, "/lib/x86_64-linux-gnu/libpthread...", 524288) = 3 <164297ns>
0.008s ┃ [3691918] read(3, "ELF\u0002\u0001\u0001", 832) = 832 <31555ns>
0.008s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD320, 4096) = 0 <26729ns>
0.008s ┃ [3691918] mmap(0x0, 16400, 1, 2050, 3, 0) = 0x7FFFF7CEF000 <27795ns>
0.008s ┃ [3691918] mmap(0x7FFFF7CF0000, 4096, 5, 2066, 3, 4096) = 0x7FFFF7CF0000 <86960ns>
0.008s ┃ [3691918] mmap(0x7FFFF7CF1000, 4096, 1, 2066, 3, 8192) = 0x7FFFF7CF1000 <31128ns>
0.008s ┃ [3691918] mmap(0x7FFFF7CF2000, 8192, 3, 2066, 3, 8192) = 0x7FFFF7CF2000 <129873ns>
0.009s ┃ [3691918] close(3) = 0 <20337ns>
0.009s ┃ [3691918] mmap(0x0, 8192, 3, 34, 4294967295, 0) = 0x7FFFF7CED000 <93940ns>
0.009s ┃ [3691918] arch_prctl(4098, 0x7FFFF7CEDDC0) = 0 <16433ns>
0.009s ┃ [3691918] set_tid_address(0x7FFFF7CEE090) = 0x38558E <32459ns>
0.009s ┃ [3691918] set_robust_list(0x7FFFF7CEE0A0, 24) = 0 <22911ns>
0.009s ┃ [3691918] rseq() = 0 <83003ns>
0.010s ┃ [3691918] mprotect(0x7FFFF7FA6000, 16384, 1) = 0 <143741ns>
0.010s ┃ [3691918] mprotect(0x7FFFF7CF2000, 4096, 1) = 0 <25440ns>
0.010s ┃ [3691918] mprotect(0x7FFFF7CF7000, 4096, 1) = 0 <77794ns>
0.010s ┃ [3691918] mprotect(0x7FFFF7DD6000, 4096, 1) = 0 <128257ns>
0.011s ┃ [3691918] mprotect(0x55555571A000, 225280, 1) = 0 <82392ns>
0.011s ┃ [3691918] mprotect(0x7FFFF7FFB000, 8192, 1) = 0 <49483ns>
0.011s ┃ [3691918] prlimit64(0, 3, 0x0, 0x7FFFFFFFDEC0) = 0 <25000ns>
0.011s ┃ [3691918] munmap(0x7FFFF7FB9000, 37070) = 0 <133491ns>
0.012s ┃ [3691918] getrandom("¶Qàº\u000eQÏ_", 8, 1) = 8 <61009ns>
0.012s ┃ [3691918] brk(0x0) = 0x555555756000 <14674ns>
0.012s ┃ [3691918] brk(0x555555777000) = 0x555555777000 <103720ns>
0.012s ┃ [3691918] openat(4294967196, "/usr/lib/locale/locale-archive", 524288) = 3 <182522ns>
0.012s ┃ [3691918] newfstatat(3, "", 0x7FFFF7FABB60, 4096) = 0 <18561ns>
0.012s ┃ [3691918] mmap(0x0, 3048928, 1, 2, 3, 0) = 0x7FFFF7A00000 <30371ns>
0.013s ┃ [3691918] close(3) = 0 <115921ns>
0.013s ┃ [3691918] openat(4294967196, "/usr/share/locale/locale.alias", 524288) = 3 <44468ns>
0.013s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD9E0, 4096) = 0 <37425ns>
0.014s ┃ [3691918] read(3, "# Locale name alias data base.\n#...", 4096) = 2996 <34499ns>
0.014s ┃ [3691918] read(3, "# Locale name alias data base.\n#...", 4096) = 0 <22762ns>
0.014s ┃ [3691918] close(3) = 0 <29658ns>
0.014s ┃ [3691918] openat(4294967196, "/usr/lib/locale/C.UTF-8/LC_TIME", 524288) = -2 <40950ns>
0.015s ┃ [3691918] openat(4294967196, "/usr/lib/locale/C.utf8/LC_TIME", 524288) = 3 <47926ns>
0.015s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFDD70, 4096) = 0 <107511ns>
0.015s ┃ [3691918] mmap(0x0, 3360, 1, 2, 3, 0) = 0x7FFFF7FC2000 <168369ns>
0.015s ┃ [3691918] close(3) = 0 <14900ns>
0.015s ┃ [3691918] openat(4294967196, "/usr/lib/x86_64-linux-gnu/gconv/...", 0) = 3 <28834ns>
0.016s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFDB90, 4096) = 0 <65867ns>
0.016s ┃ [3691918] mmap(0x0, 27028, 1, 1, 3, 0) = 0x7FFFF7FBB000 <25720ns>
0.016s ┃ [3691918] close(3) = 0 <11616ns>
0.016s ┃ [3691918] futex(0x7FFFF7FABA4C, 129, 2147483647, 0x0, 3, 0) = 0 <40651ns>
0.016s ┃ [3691918] getuid(0x0) = 0 <14010ns>
0.016s ┃ [3691918] socket(1, 526337, 0) = 3 <118293ns>
0.016s ┃ [3691918] connect(3, 0x7FFFFFFFD9B0, 110) = -2 <63366ns>
0.017s ┃ [3691918] close(3) = 0 <30264ns>
0.017s ┃ [3691918] socket(1, 526337, 0) = 3 <30650ns>
0.017s ┃ [3691918] connect(3, 0x7FFFFFFFDBA0, 110) = -2 <38875ns>
0.017s ┃ [3691918] close(3) = 0 <30067ns>
0.017s ┃ [3691918] newfstatat(4294967196, "/etc/nsswitch.conf", 0x7FFFFFFFDAD0, 0) = 0 <36464ns>
0.017s ┃ [3691918] newfstatat(4294967196, "/", 0x7FFFFFFFDBF0, 0) = 0 <19547ns>
0.017s ┃ [3691918] openat(4294967196, "/etc/nsswitch.conf", 524288) = 3 <133145ns>
0.017s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFD9F0, 4096) = 0 <23731ns>
0.018s ┃ [3691918] read(3, "# /etc/nsswitch.conf\n#\n# Example...", 4096) = 526 <34394ns>
0.018s ┃ [3691918] read(3, "# /etc/nsswitch.conf\n#\n# Example...", 4096) = 0 <22188ns>
0.018s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFDAD0, 4096) = 0 <89784ns>
0.018s ┃ [3691918] close(3) = 0 <17147ns>
0.018s ┃ [3691918] openat(4294967196, "/etc/passwd", 524288) = 3 <23220ns>
0.018s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFDB50, 4096) = 0 <14369ns>
0.018s ┃ [3691918] lseek(3, 0, 0) = 0 <88983ns>
0.019s ┃ [3691918] read(3, "root:x:0:0:root:/root:/bin/bash\n...", 4096) = 1632 <27538ns>
0.019s ┃ [3691918] close(3) = 0 <28998ns>
0.019s ┃ [3691918] uname(0x7FFFFFFFDEA0) = 0 <20705ns>
0.019s ┃ [3691918] readlink("/proc/self/exe", "/opt/bins/fastfetch", 4096) = 19 <59611ns>
0.019s ┃ [3691918] readlink("/opt", "", 1023) = -22 <42034ns>
0.019s ┃ [3691918] readlink("/opt/bins", "", 1023) = -22 <17832ns>
0.019s ┃ [3691918] readlink("/opt/bins/fastfetch", "", 1023) = -22 <36940ns>
0.020s ┃ [3691918] access("/root/.config/", 0) = 0 <21204ns>
0.020s ┃ [3691918] access("/root/.config/", 0) = 0 <18732ns>
0.020s ┃ [3691918] access("/root/", 0) = 0 <19632ns>
0.020s ┃ [3691918] access("/etc/xdg/", 0) = 0 <20281ns>
0.020s ┃ [3691918] access("/etc/", 0) = 0 <23232ns>
0.020s ┃ [3691918] access("/etc/", 0) = 0 <25762ns>
0.020s ┃ [3691918] access("/root/.local/share/", 0) = 0 <33451ns>
0.020s ┃ [3691918] access("/root/.local/share/", 0) = 0 <39735ns>
0.020s ┃ [3691918] access("/opt/share/", 0) = -2 <24184ns>
0.020s ┃ [3691918] access("/root/", 0) = 0 <19049ns>
0.021s ┃ [3691918] access("/usr/local/share/", 0) = 0 <40700ns>
0.021s ┃ [3691918] access("/usr/share/", 0) = 0 <16033ns>
0.021s ┃ [3691918] ioctl(1, 21505, 0x7FFFFFFFDFA0) = -25 <186055ns>
0.021s ┃ [3691918] openat(4294967196, "/root/.config/fastfetch/config.j...", 524288) = -2 <24724ns>
0.021s ┃ [3691918] openat(4294967196, "/root/fastfetch/config.jsonc", 524288) = -2 <30826ns>
0.021s ┃ [3691918] openat(4294967196, "/etc/xdg/fastfetch/config.jsonc", 524288) = -2 <54495ns>
0.022s ┃ [3691918] openat(4294967196, "/etc/fastfetch/config.jsonc", 524288) = -2 <30882ns>
0.022s ┃ [3691918] rt_sigaction(2, 0x7FFFFFFFDF00, 0x0) = 0 <19247ns>
0.022s ┃ [3691918] rt_sigaction(15, 0x7FFFFFFFDF00, 0x0) = 0 <15806ns>
0.022s ┃ [3691918] rt_sigaction(3, 0x7FFFFFFFDF00, 0x0) = 0 <21208ns>
0.022s ┃ [3691918] openat(4294967196, "/bedrock/etc/bedrock-release", 0) = -2 <31188ns>
0.022s ┃ [3691918] openat(4294967196, "/etc/os-release", 0) = 3 <35073ns>
0.022s ┃ [3691918] newfstatat(3, "", 0x7FFFFFFFDC90, 4096) = 0 <16889ns>
0.023s ┃ [3691918] read(3, "PRETTY_NAME=\"Debian GNU/Linux 12...", 4096) = 267 <31569ns>
0.023s ┃ [3691918] read(3, "PRETTY_NAME=\"Debian GNU/Linux 12...", 4096) = 0 <20907ns>
0.023s ┃ [3691918] close(3) = 0 <19671ns>
0.023s ┃ [3691918] access("/usr/bin/pveversion", 1) = 0 <19072ns>
0.023s ┃ [3691918] pipe2(140737488338760, 524288) = 0 <37361ns>
0.024s ┃ [3691918] clone(0x1200011, 0) = 0x38558F <450667ns>
0.024s ┃ [3691918] close(4) = 0 <30103ns>
1.304s ┃ [3691918] poll(0x7FFFFFFFBF40, 1, 5000) = 1 <1280229732ns>
1.305s ┃ [3691918] read(3, "pve-manager/8.2.7/3e0176e6bb2ade...", 8192) = 66 <147644ns>
1.330s ┃ [3691918] poll(0x7FFFFFFFBF40, 1, 5000) = 1 <25575220ns>
1.331s ┃ [3691918] read(3, "pve-manager/8.2.7/3e0176e6bb2ade...", 8192) = 0 <227940ns>
1.332s ┃ [3691918] wait4(3691919, 140737488338752, 0, 0x0) = 0x38558F <358603ns>
1.332s ┃ [3691918] close(3) = 0 <126685ns>
1.332s ┃ [3691918] newfstatat(1, "", 0x7FFFFFFFDE50, 4096) = 0 <36569ns>
1.333s ┃ [3691918] ioctl(1, 21505, 0x7FFFFFFFDDB0) = -25 <77802ns>
1.333s ┃ [3691918] write(1, "\nRETTY_NAME=\"Debian GNU/Linux 12...", 1) = 1 <25875ns>
1.333s ┃ [3691918] exit_group(0) = ?
Wow, did a time of just running
time /usr/bin/pveversion
that seems to be the culprit
/usr/bin/pveversion 1.14s user 0.11s system 99% cpu 1.248 total
I ran this as well...and wow........8000 lines of perl. Too long to post. So, at least /usr/bin/pveversion
might not be the best (fastest) way to extract that data.
❯❯ ets lurk /usr/bin/pveversion
Other things I tried that seems to be fast (haven't looked at how fastfetch parses information)
❯❯ time dpkg-query --showformat='${Version}' --show pve-manager
8.2.7dpkg-query --showformat='${Version}' --show pve-manager 0.01s user 0.00s system 96% cpu 0.018 total
❯❯ time uname -r
6.8.12-2-pve
uname -r 0.00s user 0.00s system 77% cpu 0.003 total
❯❯ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Wow, did a time of just running
time /usr/bin/pveversion
that seems to be the culprit
/usr/bin/pveversion 1.14s user 0.11s system 99% cpu 1.248 total
Please upload this file
Sure thing! 🥳
lurk
pveversion-lurk.txt
lurk -T
pveversion-lurk-t.txt
I meant uploading /usr/bin/pveversion
Had to rename it to pveversion.txt due to github complaining.
I'm not a perl programmer, but doesn't seem to be that extremely useful by just looking at the entryfile, but looking at the lurk logs + the fact that it's importing PVE::API2::APT
- it's most likely that it reads a gazillion of packages and tries to parse it from apt-get (which is so much slower than just dpkg)
Okey, let's use dpkg then.
Please test this
diff --git a/src/detection/os/os_linux.c b/src/detection/os/os_linux.c
index c7ede9b1..5e3976ba 100644
--- a/src/detection/os/os_linux.c
+++ b/src/detection/os/os_linux.c
@@ -186,13 +186,13 @@ static bool detectDebianDerived(FFOSResult* result)
ffStrbufSetS(&result->name, "Proxmox VE");
ffStrbufClear(&result->versionID);
if (ffProcessAppendStdOut(&result->versionID, (char* const[]) {
- "/usr/bin/pveversion",
+ "/usr/bin/dpkg-query",
+ "--showformat='${Version}'",
+ "--show",
+ "pve-manager",
NULL,
- }) == NULL) // pve-manager/8.2.2/9355359cd7afbae4 (running kernel: 6.8.4-2-pve)
- {
- ffStrbufSubstrBeforeLastC(&result->versionID, '/');
- ffStrbufSubstrAfterFirstC(&result->versionID, '/');
- }
+ }) == NULL) // 8.2.2
+ ffStrbufTrimRightSpace(&result->versionID);
ffStrbufSetF(&result->prettyName, "Proxmox VE %s", result->versionID.chars);
return true;
}
Like a bullet!! Awesome!!
❯❯ time ./fastfetch
.://:` `://:. root@pvecloud1
`hMMMMMMd/ /dMMMMMMh` --------------
`sMMMMMMMd: :mMMMMMMMs` OS: Proxmox VE bookworm '8.2.7' x86_64
`-/+oo+/:`.yMMMMMMMh- -hMMMMMMMy.`:/+oo+/-` Host: KVM (RHEL 7.6.0 PC (i440FX + PIIX, 1996))
`:oooooooo/`-hMMMMMMMyyMMMMMMMh-`/oooooooo:` Kernel: Linux 6.8.12-2-pve
`/oooooooo:`:mMMMMMMMMMMMMm:`:oooooooo/` Uptime: 19 days, 9 hours, 44 mins
./ooooooo+- +NMMMMMMMMN+ -+ooooooo/. Packages: 982 (dpkg)
.+ooooooo+-`oNMMMMNo`-+ooooooo+. Shell: zsh 5.9
-+ooooooo/.`sMMs`./ooooooo+- Display (VGA-1): 1024x768 [External]
:oooooooo/`..`/oooooooo: Terminal: /dev/pts/4
:oooooooo/`..`/oooooooo: CPU: Intel(R) Xeon(R) E5-2695 v3 (4) @ 2.30 GHz
-+ooooooo/.`sMMs`./ooooooo+- GPU: Cirrus Logic GD 5446
.+ooooooo+-`oNMMMMNo`-+ooooooo+. Memory: 1.49 GiB / 7.76 GiB (19%)
./ooooooo+- +NMMMMMMMMN+ -+ooooooo/. Swap: 1.25 MiB / 7.76 GiB (0%)
`/oooooooo:`:mMMMMMMMMMMMMm:`:oooooooo/` Disk (/): 8.61 GiB / 78.63 GiB (11%) - ext4
`:oooooooo/`-hMMMMMMMyyMMMMMMMh-`/oooooooo:` Local IP (vmbr0): xxx.xxx.xxx
`-/+oo+/:`.yMMMMMMMh- -hMMMMMMMy.`:/+oo+/-` Locale: C.UTF-8
`sMMMMMMMm: :dMMMMMMMs`
`hMMMMMMd/ /dMMMMMMh`
`://:` `://:`
./fastfetch 0.01s user 0.01s system 97% cpu 0.026 total
I think I should remove the quotes
For consistency maybe yes. I'm just happy with the speed. :)
@CarterLi - Just noticed that you committed this. Haven't even tried it yet... let's see if it will work, but sending in the param without the quotes gives an error
❯❯ dpkg-query --showformat=${Version} --show pve-manager
dpkg-query: error in show format: may not be empty string
... compared to
❯❯ dpkg-query --showformat='${Version}' --show pve-manager
Those quoted strings must come from somewhere else ....hmm
That's different
You need the quotes because you are running the command in bash. The quotes prevent bash from parsing ${Version}
as its special syntax.
This doesn't happen when invoking programs directly
Alright, good to know. Just wanted to give a heads up just in case.
Awesome work. Fastfetch is amazing. Using it almost everywhere to extract information, and the --json
flag just made it even easier!
Be sure to read the FAQ before submitting a new issue.
General description of bug:
What should happen: It should be as snappy when using it on a vanilla debian 12
Fastfetch version used:
fastfetch 2.28.0 (x86_64)
(tested both musl and libc versions, same issue)Did it work in an older version: I think so ;-)
Where did you get the binary: Github release
Does this issue still occur in the latest dev build? Not sure how to download and check