Skip to content

Instantly share code, notes, and snippets.

@Hermann-SW
Created June 11, 2025 20:08
Show Gist options
  • Save Hermann-SW/86474e9d8ce95d262a1d3ad5d0761b7d to your computer and use it in GitHub Desktop.
Save Hermann-SW/86474e9d8ce95d262a1d3ad5d0761b7d to your computer and use it in GitHub Desktop.
Table display of three temperatures for all installed AMD GPUs every second
#!/bin/bash
d=$(find /sys/class/drm/card?/device/unique_id | wc --l)
printf "%9s" "$(hostname)"
for((c=0;c<d;++c))
do
printf "|%s" "$(cat /sys/class/drm/card$c/device/unique_id)"
done
echo "|"
while true
do
echo -n "$(date +%T)" "| "
for((c=0;c<d;++c))
do
for((t=1;t<4;++t))
do
l=$(cat /sys/class/drm/card$c/device/hwmon/hwmon?/temp${t}_input)
printf " %3d " $((l/1000))
done
echo -n "| "
done
echo
sleep 1
done
@Hermann-SW
Copy link
Author

Display of short gpuowl test for "-d 2", on PC with 4 Instinct MI50 GPUs:

hermann@7600x:~$ ./amdgpu_temp 
    7600x|d64a58a17330f0ed|6e56508172dc76b6|6a0e7961732c730d|304c70e172dc768c|
22:01:08 |   28   29   31 |   30   36   29 |   27   31   28 |   28   32   28 | 
22:01:11 |   27   28   31 |   30   30   27 |   26   28   28 |   27   30   27 | 
22:01:12 |   27   28   31 |   29   30   27 |   26   26   28 |   26   28   27 | 
22:01:13 |   27   28   31 |   28   30   27 |   33   60   39 |   26   28   27 | 
22:01:14 |   27   28   31 |   28   29   26 |   35   63   40 |   26   27   26 | 
22:01:15 |   27   28   31 |   29   30   26 |   36   63   43 |   25   27   26 | 
22:01:16 |   27   28   31 |   28   29   26 |   37   65   44 |   25   27   26 | 
22:01:17 |   27   28   31 |   28   29   26 |   38   66   45 |   25   27   26 | 
22:01:18 |   27   28   31 |   28   29   26 |   39   67   44 |   25   27   26 | 
22:01:19 |   27   28   31 |   28   29   26 |   40   68   46 |   25   26   26 | 
22:01:20 |   27   28   31 |   28   29   26 |   41   68   46 |   25   26   26 | 
22:01:21 |   27   28   31 |   28   29   26 |   42   69   48 |   25   26   26 | 
22:01:22 |   27   28   32 |   28   29   26 |   42   70   49 |   25   26   25 | 
22:01:23 |   27   28   31 |   28   29   26 |   43   71   48 |   25   26   25 | 
22:01:24 |   27   28   30 |   27   29   26 |   44   71   50 |   25   26   25 | 
22:01:25 |   27   28   31 |   28   29   26 |   45   72   50 |   25   26   25 | 
22:01:26 |   27   28   31 |   27   29   26 |   45   73   51 |   24   26   25 | 
22:01:27 |   26   28   30 |   28   29   25 |   46   73   52 |   25   26   25 | 
22:01:28 |   27   28   32 |   28   28   26 |   40   42   42 |   24   26   25 | 
22:01:29 |   27   28   30 |   28   28   25 |   38   39   40 |   24   26   25 | 
22:01:30 |   27   28   30 |   27   29   25 |   37   38   39 |   25   26   25 | 
^C
hermann@7600x:~$ 

@Hermann-SW
Copy link
Author

Display of short gpuowl test for "-d 1", on PC with 2 Instinct MI50 GPUs:

hermann@7950x:~$ ./amdgpu_temp 
    7950x|13c24061732c730c|c49e19417337ece3|
22:01:44 |   32   37   32 |   33   38   34 | 
22:01:47 |   31   32   30 |   31   34   33 | 
22:01:48 |   31   32   30 |   31   32   33 | 
22:01:49 |   30   31   31 |   37   63   42 | 
22:01:50 |   30   31   30 |   39   66   45 | 
22:01:51 |   30   31   31 |   40   66   46 | 
22:01:52 |   30   31   29 |   42   67   47 | 
22:01:53 |   30   31   29 |   42   68   48 | 
22:01:54 |   30   31   30 |   42   67   49 | 
22:01:55 |   30   31   29 |   44   69   51 | 
22:01:56 |   29   31   29 |   45   71   52 | 
22:01:57 |   29   31   29 |   46   71   51 | 
22:01:58 |   29   30   29 |   46   72   53 | 
22:01:59 |   29   30   30 |   46   65   52 | 
22:02:00 |   29   30   30 |   47   74   54 | 
22:02:01 |   29   30   29 |   48   74   54 | 
22:02:02 |   29   30   29 |   49   75   55 | 
22:02:03 |   29   30   30 |   49   75   55 | 
22:02:04 |   29   30   28 |   49   64   53 | 
22:02:05 |   29   30   29 |   44   46   46 | 
22:02:06 |   29   30   28 |   42   44   44 | 
22:02:07 |   28   30   29 |   41   42   43 | 
22:02:08 |   28   30   28 |   41   42   42 | 
22:02:09 |   29   30   28 |   40   41   42 | 
^C
hermann@7950x:~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment