Friday, April 17, 2026

Re: [Fix] Patch btop to report active CPU usage correctly, remove desktop runtime dependency

On Thu, Apr 16, 2026 at 09:47:54PM -0500, Brent Cook wrote: > I like to use btop to monitor resource usage on servers, but it wasn't > reporting per-core CPU usage correctly on OpenBSD. I reported and got > the issue fixed upstream, but it might be a while until the next > release, so I wanted to pull that diff into ports in the mean time: > > https://github.com/aristocratos/btop/pull/1587 > > Also, I was puzzled why installing btop pulls in a lot of desktop > related dependencies. They were just used to update the icon database > on install, but I don't even have a GUI on most machines, and the > binary itself is text only I believe. I wonder if we could live > without that and make the number of dependencies for this package a > lot leaner. The initial relatively rough submission tried to do that, but when the port was beaten into committable shape this was discarded at some point. Just removing the dep isn't ok though because the tag will likely be added back in the next update, resulting in a broken or at least a noisy package install due to the missing run dependency (haven't tried). Even if that was properly disabled/patched out, I would not make such a change right before release. > Both patches are attached. Do either or both of these look OK? The CPU one makes sense to me and it definitely improves things in the default display. However, the tool can't handle CPUs being added at runtime. If you remove S from hw.blockcpu (or toggle hw.smt 0 -> 1), a running btop throws an exception and dies: ERROR: Exception in runner thread -> Cpu:: -> collect() : vector I have no real opinion on whether that is acceptable or not. It doesn't look like an absolute blocker to me, but it doesn't seem ideal. You'd need to add REVISION=0 to the Makefile, and I would also add a link to your PR at the top of the patch.

No comments:

Post a Comment