blob: 49b8fbde236b3408c6c886812cce48220b8ab3b3 (
plain)
1
2
3
4
5
6
7
|
#!/usr/bin/env zsh
echo "CPU:$(sensors | grep Core | cut -d ' ' -f 10 | sed 's|°C||' | sed 's|+||' | awk '{x+=$1; next} END{printf "%3.0f\n", x/NR}')°C"
if [[ $(command -v nvidia-smi) == 0 ]]; then
echo "GPU: $(nvidia-smi | head -9 | tail -1 | cut -d " " -f 5 | sed 's|C||')°C"
fi
|