Skip to content

Instantly share code, notes, and snippets.

@Zetaphor
Last active October 29, 2021 21:21
Show Gist options
  • Save Zetaphor/d928fc570756321d9899f7103c8858ad to your computer and use it in GitHub Desktop.
Save Zetaphor/d928fc570756321d9899f7103c8858ad to your computer and use it in GitHub Desktop.
Bash Sensors
echo 🌡 AMD: `sensors | grep 'edge:' | cut -c 16-18 | rev | cut -c 2-100 | rev`°C
echo 🌡 NVIDIA: `nvidia-smi -q -d temperature | grep 'GPU Current Temp' | cut -c 45-47 | xargs`°C
echo 🌡 2TB: `sensors | grep 'Composite:' | sed -n '1p' | cut -c 16-18 | rev | cut -c 2-10 | rev`°C
echo 🌡 1TB: `sensors | grep 'Composite:' | sed -n '2p' | cut -c 16-18 | rev | cut -c 2-10 | rev`°C
echo ⌬ CPU: `top -bn1 | sed -n '/Cpu/p' | awk '{print $2}' `%
echo ⌧ RAM `free -m | awk 'NR==2{printf "%.2fGB (%.2f%%)\n", $3/1024,$3*100/$2 }'`
echo 🌡 CPU `cat /sys/class/thermal/thermal_zone0/temp | sed 's/.\{3\}$/.&/' | rev | cut -c 5-10 | rev`°C
echo ֎ FAN: `sensors | grep cpu_fan | cut -c 17-100 | rev | cut -c 5-100 | rev | xargs`RPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment