On Wed, Oct 11, 2023 at 10:45:03AM +0000, Ben Shaul, Almog wrote: > Hi all, > > We'd like to collect hwmon sensors and get their min/max/avg for our platforms. > > Those sensors doesn't support min/max by HW and only support reading current values (they also don't support avg but that is likely the case for all other devices). > > For that goal of getting min/max/avg we have two options: > > 1. Write userspace service that will constantly read the values and do the calculations (and later report to our database) Yes, this is what you'll have to do. > 2. Extend HWMON subsystem/library so each registering hwmon device will ask the subsystem to do it for you. > Then kernel will create workqueue and constantly read the values and make the calculations (which shall later be readable via hwmon sysfs) No. This would add runtime overhead to each hwmon device even if the information is not used (which would be the case for almost every user). Guenter