Update temp.inc.sh
This commit is contained in:
@@ -610,7 +610,7 @@ SERVERROOM_TEMP_DIFFERENCE(){
|
||||
done
|
||||
[ "${LAST}" == "" ] && LAST=${scandefault}
|
||||
|
||||
echo -en "${idsCL[Yellow]}Pulling data and calculating average scan times for the last '${LAST}' scans ... "
|
||||
echo -en "${idsCL[Yellow]}Pulling data and calculating average temperature differences for the last '${LAST}' scans ... "
|
||||
|
||||
last_tempdiff=$(tail -n 1 ${PW_TMPFOLDER}/.log.sr.difference)
|
||||
last_tempdiff=${last_tempdiff#*~}
|
||||
@@ -629,24 +629,21 @@ SERVERROOM_TEMP_DIFFERENCE(){
|
||||
|
||||
[ ${scansfound} -eq 0 ] && average=0 || average=$(ROUND_NUMBER $(bc <<< "scale=2; ${tempdiff_total}/${scansfound}") 0)
|
||||
|
||||
average_disp=$(SHOW_TIME ${average} s)
|
||||
c=0; spcT=''; spc1=`expr 25 - ${#average}`; until [ $c = ${spc1} ]; do spct="${spct} "; c=`expr $c + 1`; done
|
||||
|
||||
last_tempdiff_disp=$(SHOW_TIME ${last_tempdiff} s)
|
||||
longest_tempdiff_disp=$(SHOW_TIME ${longest_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=""
|
||||
|
||||
echo -en "\r\033[K"
|
||||
echo -e "${idsCL[LightCyan]}Scan Type Scans Average Scantime${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Scan Type Scans Average Temp Difference${idsCL[Default]}"
|
||||
DIVIDER . lightCyan 60
|
||||
echo -e "${idsCL[Green]}Average for last `IDS_NUMBER_FORMAT ${scansfound}` ${idsCL[LightGreen]}(${average}s)${spct}${idsCL[Green]}${average_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[Green]}Average for last `IDS_NUMBER_FORMAT ${scansfound}` ${idsCL[LightGreen]}${average}${idsCL[Default]}"
|
||||
DIVIDER . lightCyan 60
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Longest scan from above : ${idsCL[LightGreen]}(${longest_tempdiff}s) ${idsCL[Green]}${longest_tempdiff_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Largest Temp Difference : ${idsCL[LightGreen]}${longest_tempdiff}${idsCL[Default]}"
|
||||
echo
|
||||
echo -e "${idsCL[LightCyan]}Last Scan Time : ${idsCL[LightGreen]}(${last_tempdiff}s) ${idsCL[Green]}${last_tempdiff_disp}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Last Scan Check : ${idsCL[LightGreen]}${last_scancheck}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Last Temp Difference : ${idsCL[LightGreen]}${last_tempdiff}${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Last Check : ${idsCL[LightGreen]}${last_scancheck}${idsCL[Default]}"
|
||||
|
||||
if [ ${scansfound} -le 500 ]; then
|
||||
echo -en "\n${idsCL[LightCyan]}List out these '${scansfound}' scan times? (y/N): ${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user