brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.32k stars 620 forks source link

[BUG]: OpenBSD crash when `cpu` variable is used #2088

Closed Caellian closed 2 days ago

Caellian commented 1 week ago

@epsheldoni reports a bug with ${cpu} variable on OpenBSD which causes conky to crash. I'm opening it as a separate issue because it's not related to the original one which will be fixed once fix/openbsd76-build is merged.

Conky Version

main (SHA 47ec9f9), ^v1.21.8

OS

OpenBSD 7.6

Conky config

lines that cause conky to crash:

CPU 1 usage:$alignr   ${cpu cpu1}%
CPU 2 usage:$alignr   ${cpu cpu2}%
CPU 3 usage:$alignr   ${cpu cpu3}%
...
CPU 15 usage $alignr ${cpu cpu15}%

Logs

./conky -d
conky: desktop window (0x1a00003) is subwindow of root window (0x538)
conky: window type - normal
conky: drawing to created window (0x3000002)
conky: drawing to double buffer
conky: forked to background, pid is 33192
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: x11
conky: '(null)' (null) session running 'XFCE' desktop
conky: Cannot get kern.cp_time
conky: obj->data.i 2 info.cpu_count 1
conky: attempting to use more CPUs than you have!
sysctl | grep cpu
conky: desktop window (0x1a00003) is subwindow of root window (0x538)
conky: window type - normal
conky: drawing to created window (0x3000002)
conky: drawing to double buffer
conky: forked to background, pid is 33192
conky: FOUND: console
conky: FOUND: ncurses
conky: FOUND: file
conky: FOUND: x11
conky: '(null)' (null) session running 'XFCE' desktop
conky: Cannot get kern.cp_time
conky: obj->data.i 2 info.cpu_count 1
conky: attempting to use more CPUs than you have!

The following lines in the terminal output may indicate something OpenBSD specific:

conky: Cannot get kern.cp_time
conky: obj->data.i 2 info.cpu_count 1
conky: attempting to use more CPUs than you have!

Originally posted by @epsheldoni in https://github.com/brndnmtthws/conky/issues/2073#issuecomment-2492669414

epsheldoni commented 6 days ago

OS should be OpenBSD 7.6