Closed swsnr closed 2 weeks ago
It could be interesting, design shouldn't be that hard either. Do you happen to know if there's a library way of getting this data?
And yeah, I would be happy to get any PRs.
systemd exposes this information over dbus:
# busctl call --system org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager ListUnitsByPatterns asas 1 "failed" 0
a(ssssssouso) 1 "fwupd-refresh.service" "Refresh fwupd metadata and update motd" "loaded" "failed" "failed" "" "/org/freedesktop/systemd1/unit/fwupd_2drefresh_2eservice" 0 "" "/"
zbus is a good pure Rust library for DBus. It's rather heavy though and brings in a lot of dependencies.
Also, I believe DBus calls aren't that cheap, so perhaps bottom should make these calls asynchronously and at a much lower interval than e.g. reading CPU load. Would this be possible in bottom?
That would definitely be possible to do, though currently we only have one main configurable refresh rate for data, so it might be worth introducing a second one for something like this if we need it.
Realistically I'll not find time for this so I might just as well close this.
Checklist
Describe the feature request
I think on Linux failed systemd units (i.e. what
systemctl --failed
shows) would be a helpful metric (perhaps just as a simple counter).Would you be open for a corresponding merge request?