Conversation
|
README changes are missing. |
loulecrivain
left a comment
There was a problem hiding this comment.
hi, no problem with the code as far as I can see (I'm not very good with Go!). however I'd like us to be more feature-complete regarding smonctl output parsing (please see comments).
IMO it doesn't seem a lot more code to add PSU state support. I know in the past with hwmon.yml it was a raw type configured by hand, but we also need to parse this automatically.
thanks for your work!
Oh yes, and also, while we're at it, please do this too 🌞 |
loulecrivain
left a comment
There was a problem hiding this comment.
This is not working on latest Cumulus Linux. Smonctl uses different output formats between versions (probably because of changes in other tool/daemons used by CL), and thus there's no driver_hwmon nor a driver_path in its output on the latest version. See for yourself:
- on LSCL0001
{ "name": "PSU1", "start_time": 1725878482, "psu1_pwr_status": 1, "state": "OK", "prev_state": "OK", "prev_msg": null, "msg": null, "psu1_power": 34, "log_time": 1725878482, "type": "power", "psu1_status": 1, "description": "PSU1" } - on LSCE0001:
{ "driver_hwmon": [ "psu_pwr1" ], "name": "PSU1", "start_time": 1743596939, "psu_pwr1_all_ok": "1", "state": "OK", "prev_state": "OK", "psu_pwr1_present": "1", "msg": null, "prev_msg": null, "log_time": 1743596939, "driver_path": "/sys/bus/i2c/devices/0-0030", "type": "power", "description": "PSU1" }
IMO it'd be better to change the architecture here, and to rely on values which are directly on smonctl's output instead of parsing them ourselves from /sys 🤔 They have used the same keys for values over different versions.
|
other than that, I have no other comments regarding specific parts of the code. |
f840330 to
4abc9bf
Compare
|
rebased on master |
|
I'm going to make a new PR so these changes land on master. It's a bit less cluttered |
commit 9385ad0 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 17:20:21 2025 +0200 hwmon: use wait group properly commit 4abc9bf Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 17:07:01 2025 +0200 Revert "README: update to v1.0.12" This reverts commit 9ff042d. commit 25d7105 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 17:04:13 2025 +0200 Revert "changelog: add entry" This reverts commit 5687a42. commit db6a7f1 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 17:03:54 2025 +0200 Revert "feat: dynamic smonctl" This reverts commit 44797cb. commit f1af90a Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:40:13 2025 +0200 README: fix note commit c30d308 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:32:26 2025 +0200 hwmon: name metrics properly commit d102c8a Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:29:21 2025 +0200 README: update to v1.0.12 commit bd89e15 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:28:04 2025 +0200 README: remove asic collector warning commit baa9110 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:21:43 2025 +0200 changelog: add entry commit 4f81f4f Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:20:08 2025 +0200 hwmon: add power values commit 451ced4 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Wed Apr 23 15:17:43 2025 +0200 refactor: align assignments commit ff07bdb Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Mon Apr 14 16:17:24 2025 +0200 feat: dynamic smonctl commit a43a0c5 Author: willow <52585984+Kek5chen@users.noreply.github.com> Date: Mon Apr 14 16:16:47 2025 +0200 refactor: cleanup hwmon
|
manually merged |
Implements #5
Squeezed this one in today. Tested in Lab. Should be fine but have a look.