Update temp.inc.sh

This commit is contained in:
2024-01-28 15:49:02 -06:00
parent 18dcb4aa27
commit 5390faae4a

View File

@@ -69,17 +69,18 @@ CHECKTEMP(){
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR} Host Sensors ${idsST[Reset]}${idsCL[White]}[${vHOSTiDRACIP}]"
if [ ! -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
echo -en "${idsCL[LightCyan]} Getting FanSpeed..."
if [ "${avgdays}" != "noavg" ]; then
echo -en "${idsCL[LightCyan]} Getting FanSpeed and calculating ${avgdays_disp} average..."
else
echo -en "${idsCL[LightCyan]} Getting FanSpeed..."
fi
RPM=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSOR}]} .1.3.6.1.4.1.674.10892.5.4.700.12.1.6.1.3 -O vq)
[ ! -f ${PW_TMPFOLDER}/.fanspeed.${SENSOR}.${cdt} ] && until [ -f ${PW_TMPFOLDER}/.fanspeed.${SENSOR}.${cdt} ]; do tmp=tmp; done
[ "${avgdays}" != "noavg" ] && fan_average=$(bc <<< "scale=0; $(ROUNDHALVES $(bc <<< "scale=3; $(AVERAGETEMP ${SENSOR} ${avgdays} FanSpeed)/10"))*10/1")
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR} Host Sensors ${idsST[Reset]}${idsCL[White]}[${vHOSTiDRACIP}]"
echo -en "${idsCL[LightCyan]} [FanSpeed=$(cat ${PW_TMPFOLDER}/.fanspeed.${SENSOR}.${cdt})'% "
if [ "${avgdays}" != "noavg" ]; then
echo -en "${idsCL[Yellow]}Calculating ${avgdays} Day average ... ${idsCL[LightCyan]}]"
fan_average=$(bc <<< "scale=0; $(ROUNDHALVES $(bc <<< "scale=3; $(AVERAGETEMP ${SENSOR} ${avgdays} FanSpeed)/10"))*10/1")
echo -en "\r\033[K${idsCL[White]}${idsST[Bold]}${SENSOR} Host Sensors ${idsST[Reset]}${idsCL[White]}[${vHOSTiDRACIP}]"
echo -e "${idsCL[LightCyan]} [FanSpeed=$(cat ${PW_TMPFOLDER}/.fanspeed.${SENSOR}.${cdt})'% AVG=${fan_average}'%)]${idsCL[Default]}"
echo -e "${idsCL[LightYellow]} AVG=${fan_average}'%${idsCL[LightCyan]}]${idsCL[Default]}"
else
echo -e "($(IDS_NUMBER_FORMAT ${RPM})'RPM)]${idsCL[Default]}"
fi