Created
September 30, 2015 08:17
-
-
Save pavgup/4b547cb4f1cd6d6803f1 to your computer and use it in GitHub Desktop.
a simple strategy to get temperature sensor data and fan status from a wrt1900ac router over stdout
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/sh | |
while true; | |
do | |
cputemp=$(($(cat /sys/class/hwmon/hwmon2/temp1_input)/1000)); | |
ddrtemp=$(($(cat /sys/class/hwmon/hwmon1/temp1_input)/1000)); | |
wifitemp=$(($(cat /sys/class/hwmon/hwmon1/temp2_input)/1000)); | |
date=$(date +"%H:%M:%S"); | |
fan_val=$(cat /sys/devices/pwm_fan/hwmon/hwmon0/pwm1); | |
echo $date cputemp=$cputemp" "ddrtemp=$ddrtemp" "wifitemp=$wifitemp fanstatus=$fan_val; | |
sleep 1; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment