Created
July 4, 2015 08:42
-
-
Save zzzoom/3f3cad6fdabed187eb29 to your computer and use it in GitHub Desktop.
Ganglia gmetric that sends the system temperature (read from IPMI)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GMETRIC=gmetric | |
GMETRIC_OPTS="" | |
# TODO: check ipmi modules? | |
# send cpu temps if gmond is running | |
service gmond status &> /dev/null | |
if [ $? -eq 0 ]; then | |
$GMETRIC $GMETRIC_OPTS --type="int32" --group="temp" --name="system_temp" --units="Celsius" --value=`ipmitool sdr 2>/dev/null | grep 'Sys.* Temp' | cut -d'|' -f2 | awk '{print $1}'` | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment