Update temp.inc.sh
This commit is contained in:
@@ -615,6 +615,7 @@ SERVERROOM_TEMP_DIFFERENCE(){
|
|||||||
|
|
||||||
last_tempdiff=$(tail -n 1 ${PW_TMPFOLDER}/.log.sr.difference)
|
last_tempdiff=$(tail -n 1 ${PW_TMPFOLDER}/.log.sr.difference)
|
||||||
last_tempdiff=${last_tempdiff#*~}
|
last_tempdiff=${last_tempdiff#*~}
|
||||||
|
[ ${last_tempdiff} -lt 1 ] && last_tempdiff="0${last_tempdiff}"
|
||||||
tempdiffs=$(tail -n ${LAST} ${PW_TMPFOLDER}/.log.sr.difference)
|
tempdiffs=$(tail -n ${LAST} ${PW_TMPFOLDER}/.log.sr.difference)
|
||||||
largest_tempdiff=0
|
largest_tempdiff=0
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
@@ -627,11 +628,10 @@ SERVERROOM_TEMP_DIFFERENCE(){
|
|||||||
tempdiff_total=$(bc <<< "scale=2; ${tempdiff_total}+${tempdiff}")
|
tempdiff_total=$(bc <<< "scale=2; ${tempdiff_total}+${tempdiff}")
|
||||||
((scansfound++))
|
((scansfound++))
|
||||||
done
|
done
|
||||||
|
[ ${largest_tempdiff} -lt 1 ] && largest_tempdiff="0${largest_tempdiff}"
|
||||||
|
|
||||||
[ ${scansfound} -eq 0 ] && average=0 || average=$(bc <<< "scale=2; ${tempdiff_total}/${scansfound}")
|
[ ${scansfound} -eq 0 ] && average=0 || average=$(bc <<< "scale=2; ${tempdiff_total}/${scansfound}")
|
||||||
|
[ ${average} -lt 1 ] && average="0${average}"
|
||||||
last_tempdiff_disp=$(SHOW_TIME ${last_tempdiff} s)
|
|
||||||
largest_tempdiff_disp=$(SHOW_TIME ${largest_tempdiff} s)
|
|
||||||
|
|
||||||
[ -f ${PW_TMPFOLDER}/.log.sr.difference ] && last_scancheck=$(date -d @$(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference) "+%Y-%m-%d %H:%M:%S") || last_scancheck=""
|
[ -f ${PW_TMPFOLDER}/.log.sr.difference ] && last_scancheck=$(date -d @$(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference) "+%Y-%m-%d %H:%M:%S") || last_scancheck=""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user