summaryrefslogtreecommitdiff
path: root/contrib/collect_data.sh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:03:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-07-23 15:03:00 +0200
commitb32d92e890caac903491116e9d817aa780c0323b (patch)
tree5a135c37eaa9ac94772819a28ce5beedd18e5c4a /contrib/collect_data.sh
parentc3445516ecd58e97de483cf4b7fafcc1104890d7 (diff)
Imported Upstream version 1.8.14upstream/1.8.14
Diffstat (limited to 'contrib/collect_data.sh')
-rwxr-xr-xcontrib/collect_data.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/collect_data.sh b/contrib/collect_data.sh
new file mode 100755
index 0000000..c0a5099
--- /dev/null
+++ b/contrib/collect_data.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Copyright (c) 2003 Fredrik Ohrn. All Rights Reserved.
+#
+# See the included COPYING file for license details.
+#
+
+# Edit the variables
+
+hostname=$HOSTNAME
+
+ipmi_cmd="/usr/local/bin/ipmitool -I open"
+rrd_dir="/some/dir/rrd"
+
+# No need to edit below this point.
+
+IFS="
+"
+
+for line in `eval $ipmi_cmd -c sdr list full` ; do
+
+ IFS=,
+
+ split=($line)
+
+ file="$rrd_dir/$hostname-${split[0]}.rrd"
+
+ rrdupdate "$file" "N:${split[1]}"
+done