Update status.inc

This commit is contained in:
2024-01-01 16:36:21 -06:00
parent 9c0e199b55
commit 3c743c3461

View File

@@ -2,7 +2,7 @@
STATUS(){
start=$(date +%s)
log_start=$(date "+%Y-%m-%d %H:%M:%S")
SCAN_THREADS=4
SCAN_THREADS=40
if [ "${1}" != "" ] && [ "${NM_NODETYPES[${1^^}]}" != "" ]; then
ntss=${1^^}
@@ -23,6 +23,7 @@ STATUS(){
# done
PRI_CW=40
LD_CW=80
DV_LEN=80
declare -i cw; declare -i spc1; declare -i c
@@ -37,8 +38,8 @@ STATUS(){
if [ "${STATUS_ACTION}" == "repl" ] || ([ "${STATUS_ACTION}" == "" ] && [ "${ntss}" == "" ]) || ([ "${STATUS_ACTION}" == "report" ] && [ ${REPLRUN} -eq 1 ]) || ([ "${ntss}" != "" ] && [ "${NM_REPL_CHECK[${ntss}]}" != "" ] && ([ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "repl" ])); then
if [ "${STATUS_ACTION}" != "check" ]; then
MSG="Setting up replication checks"
c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[LightCyan]}${MSG}${spc}:"
c=0; cw=${LD_CW}; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
fi
for NTYPE in "${ntypesel[@]}"; do
REPLSTART ${NTYPE} &
@@ -46,7 +47,7 @@ STATUS(){
if [ "${STATUS_ACTION}" != "check" ]; then
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
MSG="Starting processes to collect/monitor replication check"
c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
c=0; cw=${LD_CW}; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
fi
for NTYPE in "${ntypesel[@]}"; do
@@ -71,7 +72,7 @@ STATUS(){
fi
if [ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "report" ] || [ "${STATUS_ACTION}" == "services" ] || [ "${STATUS_ACTION}" == "dockers" ] || [ "${STATUS_ACTION}" == "check" ] || [ "${STATUS_ACTION}" == "all" ]; then
MSG="Starting processes to collect node service & docker info"
c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
c=0; cw=${LD_CW}; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
[ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
for NTYPE in "${ntypesel[@]}"; do
until [ $(ls ${STATUSRUN_TMPFOLDER}/status-check.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do tmp=tmp; done