summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 482d9fb)
raw | patch | inline | side by side (parent: 482d9fb)
author | Florian Forster <octo@huhu.verplant.org> | |
Sat, 13 Oct 2007 15:14:54 +0000 (17:14 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 13 Oct 2007 15:14:54 +0000 (17:14 +0200) |
contrib/exec-smartctl | [new file with mode: 0755] | patch | blob |
diff --git a/contrib/exec-smartctl b/contrib/exec-smartctl
--- /dev/null
+++ b/contrib/exec-smartctl
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+INTERVAL=60
+
+while true
+do
+ TEMP=$((sudo smartctl -d 3ware,0 -A /dev/twe0 | grep Temperature_Celsius | awk '{ print $10; }') 2>/dev/null);
+ if [ $? -ne 0 ]
+ then
+ TEMP="U"
+ fi
+ echo "huhu/exec-smart/temperature-3ware_0 interval=$INTERVAL N:$TEMP"
+
+ TEMP=$((sudo smartctl -d 3ware,1 -A /dev/twe0 | grep Temperature_Celsius | awk '{ print $10; }') 2>/dev/null);
+ if [ $? -ne 0 ]
+ then
+ TEMP="U"
+ fi
+ echo "huhu/exec-smart/temperature-3ware_1 interval=$INTERVAL N:$TEMP"
+
+ TEMP=$((sudo smartctl -d ata -A /dev/sda | grep Temperature_Celsius | awk '{ print $10; }') 2>/dev/null);
+ if [ $? -ne 0 ]
+ then
+ TEMP="U"
+ fi
+ echo "huhu/exec-smart/temperature-sata_0 interval=$INTERVAL N:$TEMP"
+
+ sleep $INTERVAL
+done