Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Script to be run every 15 minutes and collect temperature data on my CPU
- ## Created by Ben Heffron on 21 November 2014
- ##Used to measure temperature of 'server' in my garage during the winter
- #!/bin/bash
- DATE=$(date +"%D %H:%M:%S")
- CPUTEMP=$(sensors -f | grep 'CPU Temperature' | cut -c22-25)
- #get temperature data from NOAA
- wget -O /tmp/KDAA.xml http://w1.weather.gov/xml/current_obs/KDAA.xml
- CURTEMP=$(cat /tmp/KDAA.xml | grep temp_f | cut -c10-13)
- #put it into happy CSV format
- TEMP=$(echo $DATE,$CPUTEMP,$CURTEMP )
- #why wouldn't it work without this touching? is it horny?
- touch /media/Media/Network/Temperatures.csv
- echo $TEMP >> /media/Media/Network/Temperatures.csv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement