1
0
mirror of https://github.com/Spearfoot/FreeNAS-scripts synced 2025-12-06 01:23:19 +00:00

Update get_hdd_temp.sh

This commit is contained in:
Keith Nash
2017-03-24 12:57:44 -05:00
committed by GitHub
parent 6788ab4948
commit c557fa4e35

View File

@@ -44,12 +44,12 @@ printf "=== CPU (%s) ===\n" "${cores}"
cores=$((cores - 1))
for core in $(seq 0 $cores); do
temp="$(sysctl -a | grep "cpu.${core}.temp" | cut -c24-25 | tr -d "\n")"
if [ "$temp" -lt 0 ]; then
temp="--N/A--"
else
temp="${temp}C"
fi
temp="$(sysctl -a | grep "cpu.${core}.temp" | cut -c24-25 | tr -d "\n")"
if [ "$temp" -lt 0 ]; then
temp="--N/A--"
else
temp="${temp}C"
fi
printf "CPU %s: %4s\n" "$core" "$temp"
done