Subversion Repositories computer_asset_manager_v1

Rev

Blame | Last modification | View Log | Download | RSS feed

Directory contains some scripts that may be useful for getting attributes.

parseSensors.pl

A filter that takes the output of ipmitool sensor and gathers the power supply information from it. Information is output to STDOUT
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
last is the reading.

Gather information on local machine and output it to a file
ipmitool sensor | $0 > `hostname -f`.csv

From command line, where you have ssh access to several machines with ipmitool on them, use the following to gather a directory
of files containing the ipmitool sensor output, each file having the name of the remote machine and .sensors appended
ssh server_name_or_alias 'hostname -f ; sudo -S ipmitool sensor' > aaee && FNAM=$(head -1 aaee) ; sed '1d' aaee > \$FNAM.sensors

# With a directory full of `hostname -f`.sensors files,
# parse all into one CSV for CAMP | Attributes | Bulk Load
# parseSensors will automagically remove .sensors off of any hostname passed in
( echo -e "device\tattribute\tvalue" ; for i in `ls *.sensors` ; do  $0 --hostname=\$i < "\$i"  ; done ) > powerCalcs.csv