Adddding new monitoring Templates

This commit is contained in:
kamil
2015-08-12 09:14:50 +02:00
parent cca28809c9
commit 210e463ab6
14 changed files with 12930 additions and 8 deletions

13
bin/lm_sensors.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
cachefile='/tmp/lm_sensors.log'
if [ -f $cachefile ]; then
cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile)))
if [ $cachefileage -gt 300 ]; then
sensors > $cachefile
fi
else
sensors > $cachefile
fi
cat $cachefile | grep "$1" | cut -d ":" -f 2 | sed -e 's/^[ \t]*//' | cut -d " " -f 1 | tr -d "+°C?"