This commit is contained in:
2024-01-28 17:01:27 -06:00
parent d984c53de5
commit d079c67abe
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.5.187-01282024'
VERS='2.5.188-01282024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -110,7 +110,7 @@ CHECKTEMP(){
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
[ "${avgdays}" != "noavg" ] && echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Calculating ${avgdays} Day average ... "
[ "${avgdays}" != "noavg" ] && echo -en "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit} ${sensorname// /_} ${avgdays})
[ "${avgdays}" != "noavg" ] && echo -en "\r\033[K"
echo -e "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
@@ -315,7 +315,7 @@ AVERAGETEMP(){
else
WHERE="sensorid=${sensorid}"
fi
[ $(bc -l <<< "${daysback} < 1") -eq 1 ] && interval="$(ROUND_NUMBER$(bc <<< "scale=2; ${daysback}*24*60")) HOUR" || interval="${daysback} MINUTE"
[ $(bc -l <<< "${daysback} < 1") -eq 1 ] && interval="$(ROUND_NUMBER $(bc <<< "scale=2; ${daysback}*24*60")) HOUR" || interval="${daysback} MINUTE"
while IFS=$'\t' read date temp hum speed ;do
if [ "${3}" == "FanSpeed" ] && [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${sensor}]}"* ]]; then
temptotal=$(bc <<< "scale=2; ${temptotal}+${speed}")