VMWare / ESXi logging disk temperatures

Following on from a previous post, this details how I log my ESXi disk temperatures.

The temperatures are gathered with this script:


#/bin/sh
#
/vmfs/volumes/datastore2/hp/hpacucli ctrl slot=16 pd all show detail |grep "Current Temperature (C):" |awk -F ":" {'print $2'} |xargs |sed -e 's/ /,/g' > /vmfs/volumes/datastore2/hp/disk_temps.txt
cat /vmfs/volumes/datastore2/hp/disk_temps.txt | nc -w 3 <1.2.3.4> 1025

Port 1025 was chosen at random – any unassigned port above 1024 can be used.

I have another machine on 1.2.3.4 with a daemon listening on port 1025

The script (daemon) on 1.2.3.4 is run from xinetd.d and looks like this:


service xfer
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/local/bin/xfer.sh
}

Content of /usr/local/bin/xfer.sh


#!/bin/bash
#
read INCOMING
echo "$INCOMING" > /tmp/temps.txt
#

/tmp/temps.txt is read by another program (in my case the Eluna Graph System ) which graphs the temperatures.

14417195732259276268580

admin has written 88 articles