From: Siraaj Khandkar Date: Tue, 12 Jan 2021 14:09:57 +0000 (-0500) Subject: Add thermal sensors to status report X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=b7ea4f208b9b73e6602ee54f0b07be6179d70f9f;p=khome.git Add thermal sensors to status report --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 9442579..8c0a351 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -539,10 +539,20 @@ status() { echo + printf '%sthermal\n' "$indent_unit" + for _dir in /sys/class/thermal/thermal_zone* + do + printf '%s %.2f C\n' \ + $(cat "$_dir"/type) \ + $(( $(cat "$_dir"/temp) / 1000 )) + done \ + | column -t \ + | indent "${indent_unit}${indent_unit}" + + echo 'net' local -r internet_addr=$(internet_addr 0.5) local -r internet_ptr=$(host -W 1 "$internet_addr" | awk 'NR == 1 {print $NF}' ) - echo 'net' echo "${indent_unit}internet" echo "${indent_unit}${indent_unit}$internet_addr $internet_ptr" echo "${indent_unit}if"