Environment Centos 6 Cpanel 32GB Ram 512gb SSD drive / about half used
Took on managing a server and installed ClamAV. Used CRON to schedule a scan @ 1am. I notice that sites on the host stopped responding. Things like slow response to no database connection. I checked htop and saw high resource usage. Since it was so late I decided to let it run anticipating it would be done soon enough. Come to find it still running @ 9am in the morning and causing sporadic outages.
Looking for suggestions on a solution. Either a way to limit resource usage or an alternative to Clam AV
I'll elaborate in that this is a Cpanel server. The thread model is hacked wordpress sites and scanning .php files for infections. Which makes scanning worth while I'd think.
for i in `awk '!/nobody/{print $2 | "sort | uniq" }' /etc/userdomains | sort | uniq`; do /usr/local/cpanel/3rdparty/bin/clamscan -i -r /home/$i 2>>/dev/null; done >> /root/infections&
This is the CRON job created to run ClamD. At first I realized that I had backups and Clamd scheduled at the same time. However after changing the time I get the same result.
Looking at htop there are several clamd processes running and it again maxes the server out.
CPanel support suggested removing the cron job. There is lots of talk about using the service instead but after reading everything I was confused even more.