Posts: 4,997
Joined: May 2004
Reputation:
12
As I said before (info which I obtained from the sysfs kernel docs), there's no standard way to make sense of the temp data in /sys/class/hwmon. So that's not an option. I'd rather drop temperature entirely than pull in another dep for just for it. We're a media center not a hardware monitor...
Posts: 1,741
Joined: Jul 2006
Reputation:
4
Media center yes, however that often means PCs installed in closets, cabinets, and in cases with poor airflow. I for one would love to be able to configure XBMC to use LMsensors to read my GPU and CPU...
Posts: 1,165
Joined: Jan 2009
Reputation:
2
CrashX
Posting Freak
Posts: 1,165
It looks we can determine what file ( temp?? ) is used for CPU temp by running the following command:
sensors -u
We can parse the output of it to determine the file that contains temperature information ... After that we keep reading the contents of the file ...
Posts: 1,165
Joined: Jan 2009
Reputation:
2
CrashX
Posting Freak
Posts: 1,165
2009-01-23, 22:28
(This post was last modified: 2009-01-23, 22:33 by CrashX.)
Yup I agree your idea is better but I am bit worried about having it access the shell so often ... 60 seconds is also bit too much time to wait for updated temperature information ..
Anyways if you have it done already then commit away ... THANKS ALOT ...
Will you be adding fan speed and gpu temperature support as well ... I see that XBMC has some support for it but the data isn't gotten though ...
I take it now with this support all OS will now support temperature readings ...
Posts: 1,165
Joined: Jan 2009
Reputation:
2
CrashX
Posting Freak
Posts: 1,165
By the look of the code ... it is looking for integer and character ... %d %c format ...
Your cputempcommand won't give you that that .. Try this ...
echo "$(sensors -u | grep "temp2_input"| awk '{print $2 }') C"