File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -941,6 +941,22 @@ format_aliases() {
941941
942942
943943wait_for_backup_if_it_is_not_time_for_backup () {
944+ # Checking load average
945+ la=$( cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d ' .' )
946+ # i=0
947+ while [ " $la " -ge " $BACKUP_LA_LIMIT " ]; do
948+ echo -e " $( date " +%F %T" ) Load Average $la "
949+ sleep 60
950+ # if [ "$i" -ge "15" ]; then
951+ # la_error="LoadAverage $la is above threshold"
952+ # echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
953+ # sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
954+ # check_result $E_LA "$la_error"
955+ # fi
956+ la=$( cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d ' .' )
957+ # (( ++i))
958+ done
959+
944960 # block backup if current hour is after 6 AM
945961 WAIT_LOOP_ENTERED=0
946962 if pgrep -x " v-backup-users" > /dev/null
You can’t perform that action at this time.
0 commit comments