Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Which sensors are available on a multi-CPU AMD system?
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
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 868

PostPosted: Mon Aug 12, 2024 5:35 pm    Post subject: Which sensors are available on a multi-CPU AMD system? Reply with quote

Hi All,

Following advice in this topic i'm starting a separate topic for this question: https://forums.gentoo.org/viewtopic-t-1163405.html

I'm working on a program that sets the CPU's maximum frequency based on it's temperature. This allows systems to run cooler, it keeps my passive cooled system at about 70 degrees max under full load, and keeps more power hungry systems cooler so active fans can run slower (and make less noise).

One feature i'd like to add is multi-CPU support. So this is not multi-CORE, but really two (or more) physically separate CPU's on the motherboard. Sysfs reports which core belongs to which physical package, so setting the frequency per physical CPU should be easy.
Temperature readings for intel are easy too, there is a sensor called "Package id <number>" per CPU. For AMD systems i can't find the information to locate the sensors and how to relate them to a physical CPU.

If someone has access to a multi-CPU AMD system, would you be willing to run this script to collect some information and post the results here?
Code:
#!/bin/bash

HWMONS=`find /sys/class/hwmon/ -mindepth 1`

for HWMON in $HWMONS
do
 echo "Directory: $HWMON"
 echo "Driver: `cat "$HWMON/name"`"
 
 TEMPS=`find "$HWMON/" -maxdepth 2 -name "temp*_input"`
 for TEMP in $TEMPS
 do
  LABEL=${TEMP//_input/_label}
  if [ -r "$LABEL" ]
  then
   echo "`cat $LABEL` at $TEMP, value: `cat $TEMP`"
  else
   echo "Unnamed sensor at $TEMP, value: `cat $TEMP`"
  fi

 done

done

It will list all hwmon's with driver names and sensors, root privileges are not required. For example this is the output on my single-CPU multi-CORE intel system:
Code:
Directory: /sys/class/hwmon/hwmon2
Driver: drivetemp
Unnamed sensor at /sys/class/hwmon/hwmon2/temp1_input, value: 42000
Directory: /sys/class/hwmon/hwmon0
Driver: acpitz
Unnamed sensor at /sys/class/hwmon/hwmon0/temp1_input, value: 48000
Directory: /sys/class/hwmon/hwmon1
Driver: coretemp
Core 1 at /sys/class/hwmon/hwmon1/temp3_input, value: 46000
Core 2 at /sys/class/hwmon/hwmon1/temp4_input, value: 46000
Package id 0 at /sys/class/hwmon/hwmon1/temp1_input, value: 48000
Core 3 at /sys/class/hwmon/hwmon1/temp5_input, value: 46000
Core 0 at /sys/class/hwmon/hwmon1/temp2_input, value: 46000


Thanks in advance for any information you can provide.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
molletts
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2013
Posts: 127

PostPosted: Tue Aug 13, 2024 6:32 pm    Post subject: Reply with quote

This is from an older dual-Opteron 6380 (Piledriver) system, using the k10temp sensor driver:
Code:
Directory: /sys/class/hwmon/hwmon8
Driver: be2net
Unnamed sensor at /sys/class/hwmon/hwmon8/temp1_input, value: 44000
Directory: /sys/class/hwmon/hwmon6
Driver: be2net
Unnamed sensor at /sys/class/hwmon/hwmon6/temp1_input, value: 44000
Directory: /sys/class/hwmon/hwmon4
Driver: k10temp
Unnamed sensor at /sys/class/hwmon/hwmon4/temp1_input, value: 28500
Directory: /sys/class/hwmon/hwmon2
Driver: k10temp
Unnamed sensor at /sys/class/hwmon/hwmon2/temp1_input, value: 30625
Directory: /sys/class/hwmon/hwmon0
Driver: fam15h_power
Directory: /sys/class/hwmon/hwmon7
Driver: tg3
Unnamed sensor at /sys/class/hwmon/hwmon7/temp1_input, value: 55000
Directory: /sys/class/hwmon/hwmon5
Driver: k10temp
Unnamed sensor at /sys/class/hwmon/hwmon5/temp1_input, value: 28625
Directory: /sys/class/hwmon/hwmon3
Driver: fam15h_power
Directory: /sys/class/hwmon/hwmon1
Driver: k10temp
Unnamed sensor at /sys/class/hwmon/hwmon1/temp1_input, value: 34000

Unfortunately, it only reports a single temperature per package, as you can see. They look a bit on the low side, too, given that the system is busy at the moment. The iLO management module reports the CPU temps to be about 12° above this. My FX-9590 (also Piledriver) desktop routinely reports about 20° below its actual temperature via the k10temp sensors.
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