Skip to content

Instantly share code, notes, and snippets.

@ioc32
Last active August 29, 2015 14:19
Show Gist options
  • Save ioc32/d1e68ef17cd7b2c6a1bd to your computer and use it in GitHub Desktop.
Save ioc32/d1e68ef17cd7b2c6a1bd to your computer and use it in GitHub Desktop.
get_apu_temp.sh
# cat get_apu_temp.sh
#!/bin/sh
date=$(date "+%Y-%m-%dT%H:%M:%S")
temp=$(sysctl hw.sensors.km0.temp0 | sed 's/.*=\([0-9\.]*\) degC/\1/')
ints=$(vmstat -w 1 -c 2 | awk 'END {print $14}')
echo $date,$temp,$ints >> /root/apu-temperatures.csv
# crontab -l | grep get_apu_temp
* * * * * /bin/sh /root/get_apu_temp.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment