Skip to contentSkip to conversation

coretemp.0 folder contents changed

DISCUSSION Srinivas Pandruvada 3 participants 11 messages May 5, 2014 – May 9, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

for kernel : 3.15.rc3 .

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

Now We don't see them. Now we have to go /sys/devices/platform/coretemp.0/hwmon/hwmon?/ to get these values.

Thanks,
Srinivas

#1 lore raw
Quoted 8 lines · Srinivas Pandruvada

Hi,

for kernel : 3.15.rc3 .

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Quoted 3 lines

Now We don't see them. Now we have to go /sys/devices/platform/coretemp.0/hwmon/hwmon?/ to get these values.

This is also not the correct location.

You should be looking in /sys/class/hwmon/hwmonX/.

There will be a name attribute either in /sys/class/hwmon/hwmonX/name or in /sys/class/hwmon/hwmonX/device/name. For coretemp, the value reported in the name attribute will be 'coretemp'. This defines the directory where the actual sensor attributes will be located.

A better approach might be to use libsensors instead of directly accessing attributes.

To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
Quoted 26 lines · Guenter Roeck
Quoted 8 lines · Srinivas Pandruvada

Hi,

for kernel : 3.15.rc3 .

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Quoted 3 lines

Now We don't see them. Now we have to go /sys/devices/platform/coretemp.0/hwmon/hwmon?/ to get these values.

This is also not the correct location.

You should be looking in /sys/class/hwmon/hwmonX/.

There will be a name attribute either in /sys/class/hwmon/hwmonX/name or in /sys/class/hwmon/hwmonX/device/name. For coretemp, the value reported in the name attribute will be 'coretemp'. This defines the directory where the actual sensor attributes will be located.

A better approach might be to use libsensors instead of directly accessing attributes.

Quoted 8 lines

To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

Guenter

Thanks for your quick reply.

-Srinivas

#3 lore raw
In reply to Guenter Roeck

Hi Guenter, Srinivas,

Quoted 8 lines · Guenter Roeck
Quoted 5 lines · Srinivas Pandruvada

for kernel : 3.15.rc3 .

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Actually I used to recommend looking there when people were not using libsensors (e.g. for pwmconfig / fancontrol or custom scripts.) This path had the great merit of being stable across reboots, while hwmon class device numbers are not (or at least they aren't guaranteed to be.)

Quoted 6 lines

(...)
To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

I am just realizing that we are also losing the stability of hardware device based paths with that move :( I suppose I shouldn't have bothered adding support for this to fancontrol.

Don't get me wrong, I still believe this is the right move, but I fear that the question of persistent hwmon device names will resurface every now and then again. libsensors offers a solution but 1* it lacks support for pwm attributes and 2* it doesn't help with shell or perl scripts such as pwmconfig and fancontrol.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw
Quoted 28 lines · Jean Delvare

Hi Guenter, Srinivas,

Quoted 8 lines · Guenter Roeck
Quoted 5 lines · Srinivas Pandruvada

for kernel : 3.15.rc3 .

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Actually I used to recommend looking there when people were not using libsensors (e.g. for pwmconfig / fancontrol or custom scripts.) This path had the great merit of being stable across reboots, while hwmon class device numbers are not (or at least they aren't guaranteed to be.)

Quoted 6 lines

(...)
To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

I am just realizing that we are also losing the stability of hardware device based paths with that move :( I suppose I shouldn't have bothered adding support for this to fancontrol.

Quoted 6 lines

Don't get me wrong, I still believe this is the right move, but I fear that the question of persistent hwmon device names will resurface every now and then again. libsensors offers a solution but 1* it lacks support for pwm attributes and 2* it doesn't help with shell or perl scripts such as pwmconfig and fancontrol.

Can we implement a similar approach to network devices and make hwmon path names (ie the /sys/class/hwmon/XXX path name) configurable via udev ? Might be worth exploring.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#8 lore raw
In reply to Jean Delvare
Quoted 6 lines · Jean Delvare

Hi Guenter, Srinivas,

Quoted 3 lines · Guenter Roeck
Quoted 2 lines · Srinivas Pandruvada

for kernel : 3.15.rc3 .

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Actually I used to recommend looking there when people were not using libsensors (e.g. for pwmconfig / fancontrol or custom scripts.) This path had the great merit of being stable across reboots, while hwmon class device numbers are not (or at least they aren't guaranteed to be.)

I maintain thermal daemon, which was using the path. So once Ubuntu upgrade kernel, this will break. So I have to make sure that corresponding user space change is submitted. I don't want to depend on too many libraries as it also runs on many embedded platforms where many library pre-builts don't exists.

Quoted 10 lines
Quoted 6 lines

(...)
To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

I am just realizing that we are also losing the stability of hardware device based paths with that move :( I suppose I shouldn't have bothered adding support for this to fancontrol.

Quoted 5 lines

Don't get me wrong, I still believe this is the right move, but I fear that the question of persistent hwmon device names will resurface every now and then again. libsensors offers a solution but 1* it lacks support for pwm attributes and 2* it doesn't help with shell or perl scripts such as pwmconfig and fancontrol.

Also when using Android like platform with limited library support, we have to make sure that libsensor exists.

Thanks,
Srinivas

#9 lore raw
Quoted 29 lines · Srinivas Pandruvada
Quoted 6 lines · Jean Delvare

Hi Guenter, Srinivas,

Quoted 3 lines · Guenter Roeck
Quoted 2 lines · Srinivas Pandruvada

for kernel : 3.15.rc3 .

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Is there any change in the coretemp? Previously we used to see, tempx data (like temp2_input, temp2_max etc.) /sys/devices/platform/coretemp.0/.

That isn't where you are supposed to look for hwmon attributes.

Actually I used to recommend looking there when people were not using libsensors (e.g. for pwmconfig / fancontrol or custom scripts.) This path had the great merit of being stable across reboots, while hwmon class device numbers are not (or at least they aren't guaranteed to be.)

I maintain thermal daemon, which was using the path. So once Ubuntu upgrade kernel, this will break. So I have to make sure that corresponding user space change is submitted. I don't want to depend on too many libraries as it also runs on many embedded platforms where many library pre-builts don't exists.

Quoted 10 lines
Quoted 6 lines

(...)
To give you the background, hwmon attributes are in the process of being moved from the parent device to the hwmon device, or from /sys/class/hwmon/hwmonX/device/ to /sys/class/hwmon/hwmonX/, as part of an effort to streamline the code and make it more consistent and maintainable.

I am just realizing that we are also losing the stability of hardware device based paths with that move :( I suppose I shouldn't have bothered adding support for this to fancontrol.

Quoted 9 lines
Quoted 5 lines

Don't get me wrong, I still believe this is the right move, but I fear that the question of persistent hwmon device names will resurface every now and then again. libsensors offers a solution but 1* it lacks support for pwm attributes and 2* it doesn't help with shell or perl scripts such as pwmconfig and fancontrol.

Also when using Android like platform with limited library support, we have to make sure that libsensor exists.

Also some documents which can be downloaded from intel.com, refers to this path.
http://www.intel.com/content/www/us/en/intelligent-systems/cpu-monitoring-dts-peci-paper.html
So we need to request document owners to update path. But it is possible that OEM/ODMs also has similar documents or refer to such documentation.

Quoted 9 lines

Thanks,
Srinivas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#5 lore raw
In reply to Guenter Roeck

Hi Guenter,

Quoted 3 lines · Guenter Roeck

Can we implement a similar approach to network devices and make hwmon path names (ie the /sys/class/hwmon/XXX path name) configurable via udev ? Might be worth exploring.

This is one possibility indeed. The good thing is that libsensors makes no assumption on hwmon class device names, so we can change the names without breaking any application which uses libsensors. Scripts accessing sysfs directly may break though (pwmconfig would, for example.)

We'll have to be careful when choosing the new names, and make sure there is no name space collision. Network interface renaming has caused a great deal of trouble out there.

Another approach, which I have in mind for quite some time already but could never find the time to implement, would be a small helper binary which would look-up hwmon devices by libsensors-like name (and the other way around too.) Scripts could use it to benefit from libsensors persistent names.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#10 lore raw
In reply to Srinivas Pandruvada
Quoted 10 lines · Srinivas Pandruvada

I maintain thermal daemon, which was using the path. So once Ubuntu upgrade kernel,
this will break. So I have to make sure that corresponding user space change is submitted.
I don't want to depend on too many libraries as it also runs on many embedded platforms
where many library pre-builts don't exists.
(...)
Also when using Android like platform with limited library support, we have to make sure that libsensor exists.

libsensors is small, fast and portable. There's really no excuse for not using it if your daemon is written in C or C++.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw
In reply to Jean Delvare
Quoted 13 lines · Jean Delvare

Hi Guenter,

Quoted 3 lines · Guenter Roeck

Can we implement a similar approach to network devices and make hwmon path names (ie the /sys/class/hwmon/XXX path name) configurable via udev ? Might be worth exploring.

This is one possibility indeed. The good thing is that libsensors makes no assumption on hwmon class device names, so we can change the names without breaking any application which uses libsensors. Scripts accessing sysfs directly may break though (pwmconfig would, for example.)

Quoted 4 lines

We'll have to be careful when choosing the new names, and make sure there is no name space collision. Network interface renaming has caused a great deal of trouble out there.

Agreed. I'll try to find some time to play with it.

Quoted 6 lines

Another approach, which I have in mind for quite some time already but could never find the time to implement, would be a small helper binary which would look-up hwmon devices by libsensors-like name (and the other way around too.) Scripts could use it to benefit from libsensors persistent names.

Still needs that binary, though.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#7 lore raw

Hi Guenter,

Quoted 18 lines · Guenter Roeck
Quoted 11 lines · Jean Delvare
Quoted 3 lines · Guenter Roeck

Can we implement a similar approach to network devices and make hwmon path names (ie the /sys/class/hwmon/XXX path name) configurable via udev ? Might be worth exploring.

This is one possibility indeed. The good thing is that libsensors makes no assumption on hwmon class device names, so we can change the names without breaking any application which uses libsensors. Scripts accessing sysfs directly may break though (pwmconfig would, for example.)

Quoted 3 lines

We'll have to be careful when choosing the new names, and make sure there is no name space collision. Network interface renaming has caused a great deal of trouble out there.

Agreed. I'll try to find some time to play with it.

Quoted 7 lines
Quoted 5 lines

Another approach, which I have in mind for quite some time already but could never find the time to implement, would be a small helper binary which would look-up hwmon devices by libsensors-like name (and the other way around too.) Scripts could use it to benefit from libsensors persistent names.

Still needs that binary, though.

I have a proof of concept ready, I'll post it in a minute.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors