mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Do not skip backup if LA is above threshold
This commit is contained in:
parent
0bab3cdf97
commit
3d0e6dd26b
1 changed files with 9 additions and 8 deletions
|
@ -56,18 +56,19 @@ email=$(grep CONTACT $VESTA/data/users/admin/user.conf |cut -f 2 -d \')
|
|||
|
||||
# Checking load average
|
||||
la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
|
||||
i=0
|
||||
# i=0
|
||||
while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do
|
||||
echo -e "$(date "+%F %T") Load Average $la"
|
||||
sleep 60
|
||||
if [ "$i" -ge "15" ]; then
|
||||
la_error="LoadAverage $la is above threshold"
|
||||
echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
|
||||
sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
||||
check_result $E_LA "$la_error"
|
||||
fi
|
||||
wait_for_backup_if_it_is_not_time_for_backup
|
||||
# if [ "$i" -ge "15" ]; then
|
||||
# la_error="LoadAverage $la is above threshold"
|
||||
# echo "$la_error" |$SENDMAIL -s "$subj" $email $notify
|
||||
# sed -i "/ $user /d" $VESTA/data/queue/backup.pipe
|
||||
# check_result $E_LA "$la_error"
|
||||
# fi
|
||||
la=$(cat /proc/loadavg |cut -f 1 -d ' ' |cut -f 1 -d '.')
|
||||
(( ++i))
|
||||
# (( ++i))
|
||||
done
|
||||
|
||||
if [ -z "$BACKUP_TEMP" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue