File: collect_data.sh

package info (click to toggle)
ipmitool 1.8.11-2%2Bsqueeze2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,048 kB
  • ctags: 4,262
  • sloc: ansic: 43,640; sh: 9,262; makefile: 217
file content (29 lines) | stat: -rwxr-xr-x 448 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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