From: Nicolas Boisselier Date: Sat, 2 Mar 2019 02:05:47 +0000 (+0000) Subject: etc/profile.d/sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=295703914b51d21b71aee259b5b1ded22562ed6a;p=nb.git etc/profile.d/sys.sh --- diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index fd017266..3be92ca5 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -183,7 +183,6 @@ sys_cpu_load() { } sys_cpu_temperature() { - temp=$(head -1 /sys/class/thermal/thermal_zone*/temp 2>/dev/null) - [ -n "$temp" ] && echo $(($temp/1000)) - type -P vcgencmd > /dev/null && vcgencmd measure_temp | sed -E -e 's/^.*=([0-9\.]+).*$/\1/g' + awk '{printf("%.1f\n",$1/1000)}' /sys/class/thermal/thermal_zone*/temp + #awk '{ count++; sum+=$1 } END {printf("%.1f",sum/count/1000)}' /sys/class/thermal/thermal_zone*/temp }