Few queries about lm-sensors and core temp.c
Hi,
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in coretemp.c through IA32_THERMAL_STATUS MSR register). coretemp.c seems to have "jiffy" as time stamp, if I change it in the coretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax =100C is used in core temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
Thanks,
Kapil
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Kapil,
Quoted 3 lines · Kapil Dev
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in
coretemp.cthroughIA32_THERMAL_STATUSMSR register).coretemp.cseems to have "jiffy" as time stamp, if I change it in thecoretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?
Just change this condition in show_temp():
/* Check whether the time interval has elapsed */
if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {to just:
/* Always update */
if (1) {This will let you read the value as frequently as you want. Or if you want to keep a safety guard, you can simply change HZ to HZ/10 (read every 0.1 s max) or HZ/100 (read every 0.01 s max.)
Quoted 1 line
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax 0C is used in core
temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?
We have a complex heuristic to figure out the right TjMax value, but Intel made it such a mess that it is very difficult. So it really is best effort. If the driver has TjMax wrong for your CPU, please let us know what kernel version you are running, what CPU model you have is and where you found the correct TjMax value.
Then you can either try to fix it in the driver itself, or adjust it from userspace by adding this to /etc/sensors.d/coretemp.conf:
chip "coretemp-*"
compute temp1 @+5, @-5
compute temp2 @+5, @-5
compute temp3 @+5, @-5
compute temp4 @+5, @-5
compute temp5 @+5, @-5(Adjust for your own case...)
Hope that helps,
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 21 lines · Jean Delvare
Hi Kapil,
Quoted 3 lines · Kapil Dev
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in
coretemp.cthroughIA32_THERMAL_STATUSMSR register).coretemp.cseems to have "jiffy" as time stamp, if I change it in thecoretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?Just change this condition in
show_temp():/* Check whether the time interval has elapsed */ if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {to just:
/* Always update */ if (1) {This will let you read the value as frequently as you want. Or if you want to keep a safety guard, you can simply change HZ to HZ/10 (read every 0.1 s max) or HZ/100 (read every 0.01 s max.)
Quoted 8 lines
Quoted 1 line
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax 0C is used in core
temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?We have a complex heuristic to figure out the right TjMax value, but Intel made it such a mess that it is very difficult. So it really is best effort. If the driver has TjMax wrong for your CPU, please let us know what kernel version you are running, what CPU model you have is and where you found the correct TjMax value.
The 22nm processors should all report it correctly from CPU registers, so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly. I am quite sure the Haswell did too, but I am some 12,000 miles away from it and the system is shut down, so we'll have to wait for another 10 days or so until I can check it.
So, yes, we'll definitely need the CPU model and kernel version.
Guenter
Quoted 11 lines
Then you can either try to fix it in the driver itself, or adjust it from userspace by adding this to
/etc/sensors.d/coretemp.conf:chip "coretemp-*"
compute temp1 @+5, @-5 compute temp2 @+5, @-5 compute temp3 @+5, @-5 compute temp4 @+5, @-5 compute temp5 @+5, @-5
Quoted 12 lines
(Adjust for your own case...)
Hope that helps,
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi,
I just realized that I just replied to Jean, and didn't reply-all previously.
I am using 2.6.39-020639-generic kernel and I am running Ubuntu 9.04. I couldn't find /etc/sensors.d/coretemp.config file. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um .
I found that for some processors, IA32_TEMPERATURE_TARGET MSR has the Tjmax value; I assume that the coretemp.c tries to read this register and if it doesn't succeed then, it uses the heuristic value. Few other doubts I have are:
1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
2) Inside coretemp.c file, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored in IA32_ThERMAL_STATUS MSR is in milli-degrees? I also notice that there are only 7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?
Thanks,
Kapil
Quoted 36 lines · Guenter Roeck
Quoted 21 lines · Jean Delvare
Hi Kapil,
Quoted 3 lines · Kapil Dev
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in
coretemp.cthroughIA32_THERMAL_STATUSMSR register).coretemp.cseems to have "jiffy" as time stamp, if I change it in thecoretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?Just change this condition in
show_temp():/* Check whether the time interval has elapsed */ if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {to just:
/* Always update */ if (1) {This will let you read the value as frequently as you want. Or if you want to keep a safety guard, you can simply change HZ to HZ/10 (read every 0.1 s max) or HZ/100 (read every 0.01 s max.)
Quoted 8 lines
Quoted 1 line
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax 0C is used in core
temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?We have a complex heuristic to figure out the right TjMax value, but Intel made it such a mess that it is very difficult. So it really is best effort. If the driver has TjMax wrong for your CPU, please let us know what kernel version you are running, what CPU model you have is and where you found the correct TjMax value.
The 22nm processors should all report it correctly from CPU registers, so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly. I am quite sure the Haswell did too, but I am some 12,000 miles away from it and the system is shut down, so we'll have to wait for another 10 days or so until I can check it.
Quoted 27 lines
So, yes, we'll definitely need the CPU model and kernel version.
Guenter
Quoted 23 lines
Then you can either try to fix it in the driver itself, or adjust it from userspace by adding this to
/etc/sensors.d/coretemp.conf:chip "coretemp-*"
compute temp1 @+5, @-5 compute temp2 @+5, @-5 compute temp3 @+5, @-5 compute temp4 @+5, @-5 compute temp5 @+5, @-5(Adjust for your own case...)
Hope that helps,
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Kapil,
Quoted 1 line · Kapil Dev
I am using 2.6.39-020639-generic kernel and I am running Ubuntu 9.04. I couldn't find
/etc/sensors.d/coretemp.configfile.
It's OK and expected, just create the file. Every file under /etc/sensors.d will be taken into account by libsensors.
Quoted 1 line
I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um .
Note that this is our own driver documentation file. We did out best to make it accurate but it is not an official reference for TjMax values.
Quoted 1 line
I found that for some processors,
IA32_TEMPERATURE_TARGETMSR has the Tjmax value; I assume that thecoretemp.ctries to read this register and if it doesn't succeed then, it uses the heuristic value.
Yes, exactly.
Quoted 3 lines
Few other doubts I have are:
1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
The Intel datasheet was not very clear on this, so the driver makes no assumption and reads IA32_TEMPERATURE_TARGET on each core. However in practice I have never seen a CPU with different TjMax values for the different cores.
Quoted 2 lines
2) Inside
coretemp.cfile, the temperature is read in milli-degree C, and multiplied by 1000 to get C value.
Does it mean that DTS value stored inIA32_ThERMAL_STATUSMSR is in milli-degrees? I also notice that there are only 7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?
It's the other way around actually, the value is in (pseudo) degrees C in the MSR and milli-degrees C in sysfs.
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 7 lines · Kapil Dev
Hi,
I just realized that I just replied to Jean, and didn't reply-all previously.
I am using 2.6.39-020639-generic kernel and I am running Ubuntu 9.04. I couldn't find
/etc/sensors.d/coretemp.configfile. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um .I found that for some processors,
IA32_TEMPERATURE_TARGETMSR has the Tjmax value; I assume that thecoretemp.ctries to read this register and if it doesn't succeed then, it uses the heuristic value.
Might as well be that the kernel version is too old. Can you update to a more recent kernel ?
Guenter
Quoted 76 lines
Few other doubts I have are:
1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
2) Insidecoretemp.cfile, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored inIA32_ThERMAL_STATUSMSR is in milli-degrees? I also notice that there are only 7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?Thanks,
KapilQuoted 63 lines · Guenter Roeck
Quoted 21 lines · Jean Delvare
Hi Kapil,
Quoted 3 lines · Kapil Dev
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in
coretemp.cthroughIA32_THERMAL_STATUSMSR register).coretemp.cseems to have "jiffy" as time stamp, if I change it in thecoretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?Just change this condition in
show_temp():/* Check whether the time interval has elapsed */ if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {to just:
/* Always update */ if (1) {This will let you read the value as frequently as you want. Or if you want to keep a safety guard, you can simply change HZ to HZ/10 (read every 0.1 s max) or HZ/100 (read every 0.01 s max.)
Quoted 8 lines
Quoted 1 line
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax 0C is used in core
temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?We have a complex heuristic to figure out the right TjMax value, but Intel made it such a mess that it is very difficult. So it really is best effort. If the driver has TjMax wrong for your CPU, please let us know what kernel version you are running, what CPU model you have is and where you found the correct TjMax value.
The 22nm processors should all report it correctly from CPU registers, so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly. I am quite sure the Haswell did too, but I am some 12,000 miles away from it and the system is shut down, so we'll have to wait for another 10 days or so until I can check it.
So, yes, we'll definitely need the CPU model and kernel version.
Guenter
Quoted 23 lines
Then you can either try to fix it in the driver itself, or adjust it from userspace by adding this to
/etc/sensors.d/coretemp.conf:chip "coretemp-*"
compute temp1 @+5, @-5 compute temp2 @+5, @-5 compute temp3 @+5, @-5 compute temp4 @+5, @-5 compute temp5 @+5, @-5(Adjust for your own case...)
Hope that helps,
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Thanks a lot guys. You have been greatly helpful. I will try different things that you have suggested.
Best,
Kapil
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Kapil Dev
Hi,
I just realized that I just replied to Jean, and didn't reply-all previously.
Quoted 85 lines
Quoted 3 lines
I am using 2.6.39-020639-generic kernel and I am running Ubuntu 9.04. I couldn't find
/etc/sensors.d/coretemp.configfile. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um .I found that for some processors,
IA32_TEMPERATURE_TARGETMSR has the Tjmax value; I assume that thecoretemp.ctries to read this register and if it doesn't succeed then, it uses the heuristic value.Might as well be that the kernel version is too old. Can you update to a more recent kernel ?
Guenter
Quoted 76 lines
Few other doubts I have are:
1) For a multi-core processor, are there separate Tjmax for each core or just 1 Tjmax value per processor?
2) Insidecoretemp.cfile, the temperature is read in milli-degree C, and multiplied by 1000 to get C value. Does it mean that DTS value stored inIA32_ThERMAL_STATUSMSR is in milli-degrees? I also notice that there are only 7 bits assigned to DTS value, which would not be sufficient to cover the wide range of temperate values if it is in mill-degree C. Am I missing something here?Thanks,
KapilQuoted 63 lines · Guenter Roeck
Quoted 21 lines · Jean Delvare
Hi Kapil,
Quoted 3 lines · Kapil Dev
I have a couple of queries about lm-sensors package.
1) The FAQ section in chapter-1 says that the drivers update their values every 1 sec. I am aware of the fact that reading the sensors more frequently will affect the performance as it is intrusive to CPU to read an MSR, but I need to read the core-temperature values at faster rate for a project. Would you tell me what changes I should make to read the sensors faster? In particular, I want to read the core temperature (I believe it is done in
coretemp.cthroughIA32_THERMAL_STATUSMSR register).coretemp.cseems to have "jiffy" as time stamp, if I change it in thecoretemp.c, will it work? Or, is there any other file that needs to be changed during kernel-compilation?Just change this condition in
show_temp():/* Check whether the time interval has elapsed */ if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {to just:
/* Always update */ if (1) {This will let you read the value as frequently as you want. Or if you want to keep a safety guard, you can simply change HZ to HZ/10 (read every 0.1 s max) or HZ/100 (read every 0.01 s max.)
Quoted 8 lines
Quoted 1 line
2) Does the lm-sensor package use the correct value of Tjmax (the temp value at which PROCHOT signal goes high) automatically based on the processor brand and type? I noticed that the Tjmax 0C is used in core
temp.c, but the 22nm intel processor that I am working on has Tjmax of 105C. Do I need to change it myself?We have a complex heuristic to figure out the right TjMax value, but Intel made it such a mess that it is very difficult. So it really is best effort. If the driver has TjMax wrong for your CPU, please let us know what kernel version you are running, what CPU model you have is and where you found the correct TjMax value.
The 22nm processors should all report it correctly from CPU registers, so this is really odd. My IvyBridge CPU (i7-3770K) reports it correctly. I am quite sure the Haswell did too, but I am some 12,000 miles away from it and the system is shut down, so we'll have to wait for another 10 days or so until I can check it.
So, yes, we'll definitely need the CPU model and kernel version.
Guenter
Quoted 23 lines
Then you can either try to fix it in the driver itself, or adjust it from userspace by adding this to
/etc/sensors.d/coretemp.conf:chip "coretemp-*"
compute temp1 @+5, @-5
compute temp2 @+5, @-5
compute temp3 @+5, @-5
compute temp4 @+5, @-5
compute temp5 @+5, @-5(Adjust for your own case...)
Hope that helps,
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Kapil, Guenter,
Quoted 7 lines · Guenter Roeck
Quoted 3 lines · Kapil Dev
I am using 2.6.39-020639-generic kernel and I am running Ubuntu 9.04. I couldn't find
/etc/sensors.d/coretemp.configfile. I am using 3450S intel i5 processor, which has Tjmax of 103C (sorry for the typo in my original email), based on http://users.sosdg.org/~qiyong/lxr/source/Documentation/hwmon/coretemp?a=um .I found that for some processors,
IA32_TEMPERATURE_TARGETMSR has the Tjmax value; I assume that thecoretemp.ctries to read this register and if it doesn't succeed then, it uses the heuristic value.Might as well be that the kernel version is too old. Can you update to a more recent kernel ?
He doesn't have to update the whole kernel, just building an up-to-date coretemp driver would do. I have made the kernel v3.10 version of the coretemp driver available at:
http://khali.linux-fr.org/devel/lm-sensors/drivers/coretemp/
Instructions at:
http://khali.linux-fr.org/devel/lm-sensors/drivers/INSTALL
Signature · 7 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors