From 295703914b51d21b71aee259b5b1ded22562ed6a Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 2 Mar 2019 02:05:47 +0000 Subject: [PATCH] etc/profile.d/sys.sh --- etc/profile.d/sys.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 } -- 2.47.3