Update status.inc
This commit is contained in:
@@ -769,10 +769,19 @@ STATUS_SCANTIMES(){
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
[ "${LAST}" == "" ] && LAST=480
|
[ "${LAST}" == "" ] && LAST=480
|
||||||
|
|
||||||
|
echo -en "${idsCL[Yellow]}Pulling data and calculating average scan times for the last '${LAST}' scans ... "
|
||||||
|
|
||||||
scantimes=($(tail -n ${LAST} ${NM_LOGFOLDER}/status-check.scantimes))
|
scantimes=($(tail -n ${LAST} ${NM_LOGFOLDER}/status-check.scantimes))
|
||||||
|
scantimes_total=0
|
||||||
for scantime in "${scantimes[@]}"; do
|
for scantime in "${scantimes[@]}"; do
|
||||||
echo "HERE: $scantime"
|
scantimes_total=((${scantimes_total}+${scantime}))
|
||||||
done
|
done
|
||||||
|
average=$(bc <<< "scale=1; ${scantimes_total}/${LAST}")
|
||||||
|
|
||||||
|
echo -en "\r\033[K"
|
||||||
|
echo -e "${idsCL[LightCyan]}Average scan time for the last '${LAST}' scans : ${idsCL[Green]}${average}${idsCL[Default]}\n"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user