Skip to content

Instantly share code, notes, and snippets.

@sharl
Created October 14, 2023 20:34
Show Gist options
  • Save sharl/cb4703c992383f1c6e8266a73860ed1a to your computer and use it in GitHub Desktop.
Save sharl/cb4703c992383f1c6e8266a73860ed1a to your computer and use it in GitHub Desktop.
ReadyNAS 6.10.x cpu temp and fan monitor
#!/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