[download]

local/bin/temp

   1 #!/bin/bash
   2 
   3 # exec > >(sort -nr)
   4 
   5 printf '%d°C  CPU  %s\n' \
   6 "$(sensors | awk '/CPUTIN/ { print int($2) }')" \
   7 "$(awk '/model name/ { print $6; exit }' /proc/cpuinfo)"
   8 
   9 nvidia-smi --query-gpu=temperature.gpu,name --format=csv,noheader | sed 's/,/°C  GPU /'
  10 
  11 printf '%d°C  MBR  %s\n' \
  12 "$(sensors | awk '/SYSTIN/ { print int($2) }')" \
  13 "$(paste -d ' ' /sys/devices/virtual/dmi/id/board_{vendor,name})"
  14 
  15 cd /sys/block && paste <(hddtemp -qn /dev/sd?) <(cat sd?/queue/rotational) \
  16 <(cat sd?/device/model) | awk -F \\t '$1 { print $1 "°C  " ($2 ? "HDD" : "SSD") "  " $3 }'