speedup of status check of nodes
This commit is contained in:
parent
29713bcc14
commit
3c9a4d5ee8
44
ppss
44
ppss
@ -794,6 +794,21 @@ process_arguments () {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$SRC_DIR" == "." ]
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "PPSS is not designed to process items from within the directory"
|
||||||
|
echo "it is being run. PPSS will start to process its own files from"
|
||||||
|
echo "its working directory $PPSS_DIR which is probably not wat you"
|
||||||
|
echo "want. Are you sure you want to continue?"
|
||||||
|
echo
|
||||||
|
read YN
|
||||||
|
if [ ! "$YN" == "y" ] || [ ! "$YN" == "Y" ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$DAEMON" == "1" ] && [ -z "$SRC_DIR" ]
|
if [ "$DAEMON" == "1" ] && [ -z "$SRC_DIR" ]
|
||||||
then
|
then
|
||||||
showusage_short
|
showusage_short
|
||||||
@ -1109,18 +1124,17 @@ upload_status () {
|
|||||||
|
|
||||||
set_status () {
|
set_status () {
|
||||||
|
|
||||||
STATUS="$1"
|
|
||||||
NO_PROCESSED=$(wc -l "$LIST_OF_PROCESSED_ITEMS" | awk '{ print $1 }' )
|
|
||||||
NODE=`cat $PPSS_DIR/$NODE_ID`
|
|
||||||
|
|
||||||
echo "$NODE $HOSTNAME $STATUS $NO_PROCESSED" > "$NODE_STATUS_FILE"
|
|
||||||
if [ ! -z "$SSH_SERVER" ]
|
if [ ! -z "$SSH_SERVER" ]
|
||||||
then
|
then
|
||||||
|
STATUS="$1"
|
||||||
|
NO_PROCESSED=$(wc -l "$LIST_OF_PROCESSED_ITEMS" | awk '{ print $1 }' )
|
||||||
|
NODE=`cat $PPSS_DIR/$NODE_ID`
|
||||||
|
|
||||||
|
echo "$NODE $HOSTNAME $STATUS $NO_PROCESSED" > "$NODE_STATUS_FILE"
|
||||||
upload_status
|
upload_status
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
check_status () {
|
check_status () {
|
||||||
|
|
||||||
ERROR="$1"
|
ERROR="$1"
|
||||||
@ -1238,7 +1252,8 @@ is_screen_installed () {
|
|||||||
ssh -q $SSH_OPTS_NODE $SSH_KEY $USER@$NODE "screen -m -D -S test ls" > /dev/null 2>&1
|
ssh -q $SSH_OPTS_NODE $SSH_KEY $USER@$NODE "screen -m -D -S test ls" > /dev/null 2>&1
|
||||||
if [ ! "$?" == "0" ]
|
if [ ! "$?" == "0" ]
|
||||||
then
|
then
|
||||||
log ERROR "The 'Screen' command is not installed on node $NODE."
|
log ERROR "The 'Screen' command may not be installed on node $NODE."
|
||||||
|
log ERROR "Or some other SSH related error occurred."
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
log DEBUG "'Screen' is installed on node $NODE."
|
log DEBUG "'Screen' is installed on node $NODE."
|
||||||
@ -2654,21 +2669,6 @@ start_all_workers () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
#get_status_of_node () {
|
|
||||||
#
|
|
||||||
# NODE="$1"
|
|
||||||
# NODE_HOSTNAME=`ssh $SSH_OPTS_NODE $SSH_KEY $USER@$NODE hostname`
|
|
||||||
# STATUS=`ssh $SSH_OPTS_NODE $SSH_KEY $USER@$NODE cat "$PPSS_HOME_DIR/$PPSS_NODE_STATUS/$NODE_HOSTNAME-status.txt" 2>/dev/null`
|
|
||||||
# echo "STATUS=ssh $SSH_OPTS_NODE $SSH_KEY $USER@$NODE cat $PPSS_HOME_DIR/$PPSS_DIR/$PPSS_NODE_STATUS/$NODE_HOSTNAME-status.txt 2>/dev/null" >> abc.txt
|
|
||||||
# ERROR="$?"
|
|
||||||
# if [ ! "$ERROR" == "0" ]
|
|
||||||
# then
|
|
||||||
# STATUS="UNKNOWN"
|
|
||||||
# fi
|
|
||||||
# echo "$STATUS"
|
|
||||||
#}
|
|
||||||
|
|
||||||
#get_node_status_from_server () {
|
|
||||||
get_status_of_nodes () {
|
get_status_of_nodes () {
|
||||||
|
|
||||||
RESULT_FILE="$1"
|
RESULT_FILE="$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user