Created
October 14, 2023 20:34
-
-
Save sharl/cb4703c992383f1c6e8266a73860ed1a to your computer and use it in GitHub Desktop.
ReadyNAS 6.10.x cpu temp and fan monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASE=/sys/devices/platform/soc/soc:internal-regs/d0011000.i2c/i2c-0/0-003e/hwmon/hwmon0 | |
target=${BASE}/fan1_target | |
input=${BASE}/fan1_input | |
if [ ! -z "$*" ]; then | |
if [[ $1 =~ ^[0-9]+$ ]]; then | |
echo $1 > ${target} | |
fi | |
fi | |
echo "temp =$(( $(cat /sys/devices/virtual/hwmon/hwmon1/temp1_input) / 1000 ))" | |
echo "target=$(cat ${target})" | |
echo "input =$(cat ${input})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment