Автоматический перезапуск tomcat если он не активен
#!/bin/bash
TOMCAT_PID=$(ps -ef | awk '/[t]omcat/{print $2}')
echo TOMCAT PROCESSID $TOMCAT_PID
if [ -z "$TOMCAT_PID" ]
then
echo "TOMCAT NOT RUNNING"
service tomcat restart
else
echo "TOMCAT RUNNING"
fi
При ошибке обновления:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=genclo error was
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
grep "/test/" ./log.log | cut -d ' ' -f 1 | sort | uniq -c | sort -n | tail -n 30
Источник: https://habr.com/ru/articles/236771/
cat access.log | cut -d'"' -f 6 | grep bot | sort | uniq
Заблокировать лишних в .htaccess
SetEnvIfNoCase User-Agent "AhrefsBot|DotBot|SemrushBot|PetalBot" bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>