High CPU load caused by ClamAV. Is it set under crontab?

SuperBaby

Well-Known Member
Nov 27, 2003
345
1
166
Thailand
cPanel Access Level
Website Owner
Twitter
Everyday when I check the CPU usage under WHM, I will get these 3 processes occupying the top 3 positions. It seems that this process is run 3 times a day.

The only ClamAV-related crontab that I have (as far as I know) is the virus file update which is conducted twice a day. What ClamAV activities are these?

Top Process %CPU 99.9 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --tempdir/tmp/clamav.15628 -r --disable-summary --stdout .

Top Process %CPU 83.6 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --tempdir/tmp/clamav.4340 -r --disable-summary --stdout .

Top Process %CPU 17.4 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --tempdir/tmp/clamav.9046 -r --disable-summary --stdout .
 

jbgama

Registered
Oct 12, 2006
2
0
151
In ConfigServer MailScanner Front-End change:

# This *cannot* be the filename of a ruleset.

Virus Scanners = clamav

to

Virus Scanners = clamavmodule
 

WhiteBear

Well-Known Member
Feb 19, 2004
53
0
156
I changed as suggested but I stopped receiving mails. Change it back to "clamav" and it works again. Why?
Hello SuperBaby,

Do you obtained to fix the problem with ClamAV?

I have exactly problem.

Top Process %CPU 153 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --max-ratio500 --tempdir/tmp/clamav.638 -r --no-summary --stdout .
Top Process %CPU 150 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --max-ratio500 --tempdir/tmp/clamav.18031 -r --no-summary --stdout .
Top Process %CPU 109 /usr/local/bin/clamscan --unzip --jar --tar --tgz --deb --max-ratio500 --tempdir/tmp/clamav.26293 -r --no-summary --stdout .

Thanks,

WhiteBear
 

orty

Well-Known Member
Jun 29, 2004
109
0
166
Bend, Oregon
cPanel Access Level
Root Administrator
In ConfigServer MailScanner Front-End change:

# This *cannot* be the filename of a ruleset.

Virus Scanners = clamav

to

Virus Scanners = clamavmodule
You can't just change it to clamavmodule unless the perl module is indeed installed -- which is probably why things didn't work when you reinstalled.

If you want to run on the clamavmodule, you need to make sure its installed by running this command at root:

/scripts/perlinstaller --force Mail::ClamAV

Then you should be able to change your scanner to clamavmodule.

I had issues with MailScanner, cPanel 11, and a perl upgrade, and it totally hosing my mailscanner install. I basically had to fully reinstall all the Mailscanner required perl libraries, reinstall mailscanner, and then reinstall clamav.

Read about the mess here. Or, honestly, pay the ConfigServer.com folks to do it for you, if you don't know what you're doing, as they're good folks and do great work.