# which /sys/class/hwmon/hwmon*/temp*_input  is CPU/GPU etc?

## rudregues

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:

```
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:

```
$ ls /sys/class/hwmon

hwmon0  hwmon1
```

-->> Would hwmon0 and hwmon1 be CPU and GPU or CPU and HDD?

hwmon0:

```
$ 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:

```
$ 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
```

```
$ 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?

----------

## rudregues

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:

```
$ 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.

----------

