Adjust thermal readouts

This commit is contained in:
Thomas Kaiser 2017-04-20 09:02:43 +02:00
parent d6dbec122b
commit a52c74ac72
2 changed files with 4 additions and 9 deletions

View File

@ -55,17 +55,12 @@ prepare_temp_monitoring() {
# SoC temp: check standard location first
if [[ -d "/sys/devices/virtual/thermal/thermal_zone0" ]]; then
# mainline kernel, Armada 38x, sun50i legacy
# mainline kernel, Armada 38x, sun50i/sun8i legacy
ln -fs /sys/devices/virtual/thermal/thermal_zone0/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/class/thermal/thermal_zone1" ]]; then
# sun8i legacy
ln -fs /sys/class/thermal/thermal_zone1/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/devices/virtual/thermal/thermal_zone1" ]]; then
# S500
# S500 legacy -- thermal_zone0 is battery here
# RK3288 legacy -- thermal_zone2 is gpu_thermal here
ln -fs /sys/devices/virtual/thermal/thermal_zone1/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/class/thermal/thermal_zone2" ]]; then
# RK3288 legacy
ln -fs /sys/class/thermal/thermal_zone2/temp /etc/armbianmonitor/datasources/soctemp
elif [[ -d "/sys/devices/platform/a20-tp-hwmon" ]]; then
# sun7i legacy
ln -fs /sys/devices/platform/a20-tp-hwmon/temp1_input /etc/armbianmonitor/datasources/soctemp

View File

@ -102,7 +102,7 @@ function storage_info() {
RootInfo=$(df -h /)
root_usage=$(awk '/\// {print $(NF-1)}' <<<${RootInfo} | sed 's/%//g')
root_total=$(awk '/\// {print $(NF-4)}' <<<${RootInfo})
StorageInfo=$(df -h $storage | grep $storage)
StorageInfo=$(df -h $storage 2>/dev/null | grep $storage)
if [ -n "${StorageInfo}" ]; then
storage_usage=$(awk '/\// {print $(NF-1)}' <<<${StorageInfo} | sed 's/%//g')
storage_total=$(awk '/\// {print $(NF-4)}' <<<${StorageInfo})