]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/sys.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 2 Mar 2019 02:05:47 +0000 (02:05 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 2 Mar 2019 02:05:47 +0000 (02:05 +0000)
etc/profile.d/sys.sh

index fd017266a03afec95cb9280e9d43fd6c81b4299a..3be92ca5d957c684ac4822a11737a63ac6f50d81 100644 (file)
@@ -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
 }