Update status.inc
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
STATUS(){
|
STATUS(){
|
||||||
start=$(date +%s)
|
start=$(date +%s)
|
||||||
log_start=$(date "+%Y-%m-%d %H:%M:%S")
|
log_start=$(date "+%Y-%m-%d %H:%M:%S")
|
||||||
SCAN_THREADS=4
|
SCAN_THREADS=40
|
||||||
|
|
||||||
if [ "${1}" != "" ] && [ "${NM_NODETYPES[${1^^}]}" != "" ]; then
|
if [ "${1}" != "" ] && [ "${NM_NODETYPES[${1^^}]}" != "" ]; then
|
||||||
ntss=${1^^}
|
ntss=${1^^}
|
||||||
@@ -23,6 +23,7 @@ STATUS(){
|
|||||||
# done
|
# done
|
||||||
|
|
||||||
PRI_CW=40
|
PRI_CW=40
|
||||||
|
LD_CW=80
|
||||||
DV_LEN=80
|
DV_LEN=80
|
||||||
declare -i cw; declare -i spc1; declare -i c
|
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}" == "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
|
if [ "${STATUS_ACTION}" != "check" ]; then
|
||||||
MSG="Setting up replication checks"
|
MSG="Setting up replication checks"
|
||||||
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}:"
|
echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
|
||||||
fi
|
fi
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
REPLSTART ${NTYPE} &
|
REPLSTART ${NTYPE} &
|
||||||
@@ -46,7 +47,7 @@ STATUS(){
|
|||||||
if [ "${STATUS_ACTION}" != "check" ]; then
|
if [ "${STATUS_ACTION}" != "check" ]; then
|
||||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||||
MSG="Starting processes to collect/monitor replication check"
|
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}: "
|
echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
|
||||||
fi
|
fi
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
@@ -71,7 +72,7 @@ STATUS(){
|
|||||||
fi
|
fi
|
||||||
if [ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "report" ] || [ "${STATUS_ACTION}" == "services" ] || [ "${STATUS_ACTION}" == "dockers" ] || [ "${STATUS_ACTION}" == "check" ] || [ "${STATUS_ACTION}" == "all" ]; then
|
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"
|
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}: "
|
[ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
until [ $(ls ${STATUSRUN_TMPFOLDER}/status-check.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do tmp=tmp; done
|
until [ $(ls ${STATUSRUN_TMPFOLDER}/status-check.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do tmp=tmp; done
|
||||||
|
|||||||
Reference in New Issue
Block a user