2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-10 11:15:20 +00:00
Files
lm-sensors/doc/developers/sysctl

17 lines
893 B
Plaintext
Raw Normal View History

You can access everything under /proc/sys through the sysctl interface. This
is mostly useful for C programs, which can use the sysctl function. Try
'man 2 sysctl' for more information.
As each chip gets its own directory under /proc/sys/dev/sensors, you must
somehow know the sysctl id of these directories to access the sensor data.
This is done through the file /proc/sys/dev/sensors/chips (see sensors.h
for the corresponding SYSCTL ids). You can only read this file; it
returns an array of struct sensors_chips_data, as defined in sensors.h.
Each chip will have its own entry here, with both its sysctl id and
the corresponding /proc name.
Generally, it is a better idea to use the new libsensors to access this
data. If you feel you need more than the library offers, please mail us,
so we can either add the new functionality to the library, or explain how
you can work around it.