From b9e7f32b2cac34e8c81b792e5ba39b667630c9c0 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 16 May 2019 05:01:34 +0100 Subject: [PATCH] etc/profile.d/sys.sh --- etc/profile.d/sys.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 64864ff5..15f770ad 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -228,12 +228,12 @@ sys_cpu_load() { } sys_cpu_temperature() { - # Mac, others - # /sys/devices/platform/applesmc.768/temp*input - ( - cat /sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input \ - || cat /sys/class/thermal/thermal_zone*/temp - ) | awk '/^[0-9]/ {printf("%.1f\n",$1/1000)}' -# NB 13.05.19 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 + # Mac, others + # /sys/devices/platform/applesmc.768/temp*input + ( + cat /sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input \ + || cat /sys/class/thermal/thermal_zone*/temp + ) 2>/dev/null | awk '/^[0-9]/ {printf("%.1f\n",$1/1000)}' + # NB 13.05.19 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