Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
which /sys/class/hwmon/hwmon*/temp*_input is CPU/GPU etc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 227
Location: Brazil

PostPosted: Thu Apr 23, 2015 10:06 pm    Post subject: which /sys/class/hwmon/hwmon*/temp*_input is CPU/GPU etc? Reply with quote

I'm setting up my conky bar and come across with a problem to how determine the temperature file of my two cores and my gpu. If I run:

Code:
watch -n 0.1 cat /sys/class/hwmon/hwmon*/temp*_input
46500
47000
48000
42000


Sometimes I have the first and second lines equal, sometimes I have second and third lines equal. The last is always different from the others. I'm not sure, but I thin the last is my GPU temperature, one of the first three are my two cores and the other is something like the mean of the cores or maybe my HDD.

More info:
Code:
$ ls /sys/class/hwmon
hwmon0  hwmon1
-->> Would hwmon0 and hwmon1 be CPU and GPU or CPU and HDD?


hwmon0:
Code:
$ ls /sys/class/hwmon/hwmon0/
name  power  subsystem  temp1_crit  temp1_input  uevent
$ cat /sys/class/hwmon/hwmon0/name
acpitz
-->> I think It could represent my GPU or HDD

hwmon1:
Code:
$ ls /sys/class/hwmon/hwmon1/
device  power      temp1_crit        temp1_input  temp1_max   temp2_crit_alarm  temp2_label  temp3_crit        temp3_input  temp3_max
name    subsystem  temp1_crit_alarm  temp1_label  temp2_crit  temp2_input       temp2_max    temp3_crit_alarm  temp3_label  uevent

Code:
$ cat /sys/class/hwmon/hwmon1/name
coretemp
$ cat /sys/class/hwmon/hwmon1/temp1_label
Physical id 0
 $ cat /sys/class/hwmon/hwmon1/temp2_label
Core 0
 $ cat /sys/class/hwmon/hwmon1/temp3_label
Core 1
-->> Obviously, temp2 and temp3 refer to my Cores, but what about temp1? Could it be 'a generic' reference of my CPU or could it be my HDD or even GPU?
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
rudregues
Apprentice
Apprentice


Joined: 29 Jan 2013
Posts: 227
Location: Brazil

PostPosted: Thu Apr 23, 2015 10:13 pm    Post subject: Reply with quote

I found a kernel doc about sysfsinterface:
Quote:
Each chip gets its own directory in the sysfs /sys/devices tree. To
find all sensor chips, it is easier to follow the device symlinks from
/sys/class/hwmon/hwmon*
https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

So, I ran:
Code:
$ ls -l /sys/class/hwmon/hwmon*
lrwxrwxrwx 1 root root 0 Apr 23 16:40 /sys/class/hwmon/hwmon0 -> ../../devices/virtual/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Apr 23 16:40 /sys/class/hwmon/hwmon1 -> ../../devices/platform/coretemp.0/hwmon/hwmon1
Not sure how to interpret this however.
_________________
Emerging en gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum