One Hat Cyber Team
Your IP :
18.218.24.244
Server IP :
192.145.235.60
Server :
Linux ngx365.inmotionhosting.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
Server Software :
Apache
PHP Version :
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
sharedrads
/
Edit File:
temp_apache_fix
mem=$(ps -o 'rss' -C httpd|awk '{sum += $1} END {print sum/1024/1024}' |tail -1); memint=${mem%.*} echo "Apache is using $mem G of memory right now"; count=$(apachectl fullstatus | awk '$4 ~ /G/' | awk '{print $14}' | wc -l); echo "Currently have $count gracefully stopping Apache processes"; echo "Looking for FPM pools to restart..."; apachectl fullstatus | awk '$4 ~ /G/' | awk '{print $14}' | sort | uniq -c | sort -nk1 | tail -4 | awk '{print $2}' | awk -F: '{print $1}' | while read dom; do conf=$(grep "^\[.*$dom" -rl /opt/ngxconf); if [ ! -z $conf ]; then master=$(basename -s.conf $conf); echo $master; fi; done | sort | uniq | while read master; do echo "Restarting $master..."; /opt/imh-python/bin/supervisorctl -c /opt/ngxconf/supervisord/supervisord.conf restart $master; done count=$(apachectl fullstatus | awk '$4 ~ /G/' | awk '{print $14}' | wc -l); echo "We now have $count gracefully stopping Apache processes"; echo "Waiting a bit to let Apache reclaim workers..."; sleep 10; mem=$(ps -o 'rss' -C httpd|awk '{sum += $1} END {print sum/1024/1024}' |tail -1); echo "Apache is using $mem G of memory now. If it's significantly less, we should be good!";
Simpan