mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 13:30:17 +02:00
loadMon.sh
allows automated control of the celery scripts when ran as a cron job in order to keep celery from crashing the server due to a loop.
This commit is contained in:
parent
1ab216383a
commit
40c4eff8c7
10
loadMon.sh
Normal file
10
loadMon.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
trigger=5.00
|
||||
load=`cat /proc/loadavg | awk '{print $1}'`
|
||||
response=`echo | awk -v T=$trigger -v L=$load 'BEGIN{if ( L > T){ print "greater"}}'`
|
||||
if [[ $response = "greater" ]]
|
||||
then
|
||||
killall screen
|
||||
sleep 8m
|
||||
bash /home/allianceserver/allianceauth/start_bg_tasks.sh
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user