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.

Revisions

  1. Hermann-SW created this gist Jun 11, 2025.
    25 changes: 25 additions & 0 deletions amdgpu_temp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    #!/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