Created
July 14, 2017 16:21
-
-
Save pgmot/a523de50ed1358747a30a5e2a256e362 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# ref: https://github.com/ymyzk/mackerel-plugins/blob/master/raspberrypi/temp.sh | |
SECONDS=`date '+%s'` | |
NAME='temperature.cpu' | |
TEMP=`cat /sys/class/thermal/thermal_zone0/temp` | |
VALUE=`echo "scale=3; ${TEMP} / 1000" | bc` | |
echo -e "${NAME}\t${VALUE}\t${SECONDS}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment