Subversion Repositories computer_asset_manager_v1

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
108 rodolico 1
Directory contains some scripts that may be useful for getting attributes.
2
 
3
parseSensors.pl
4
 
5
A filter that takes the output of ipmitool sensor and gathers the power supply information from it. Information is output to STDOUT
6
in a tab delimited string(s) (one per line). The first column is the name of the host, the second is an attribute name, and the
7
last is the reading.
8
 
9
Gather information on local machine and output it to a file
10
ipmitool sensor | $0 > `hostname -f`.csv
11
 
12
From command line, where you have ssh access to several machines with ipmitool on them, use the following to gather a directory
13
of files containing the ipmitool sensor output, each file having the name of the remote machine and .sensors appended
14
ssh server_name_or_alias 'hostname -f ; sudo -S ipmitool sensor' > aaee && FNAM=$(head -1 aaee) ; sed '1d' aaee > \$FNAM.sensors
15
 
16
# With a directory full of `hostname -f`.sensors files,
17
# parse all into one CSV for CAMP | Attributes | Bulk Load
18
# parseSensors will automagically remove .sensors off of any hostname passed in
19
( echo -e "device\tattribute\tvalue" ; for i in `ls *.sensors` ; do  $0 --hostname=\$i < "\$i"  ; done ) > powerCalcs.csv