Score:0

LMD on Ubuntu 20.04 Server

tr flag

Despite haviing ClamAV-Daemon installed, LMD / inotify always execute usr/bin/clamscan for scans, rather than using clamd, causes 100% CPU usage spikes.

I've checked the /usr/local/maletect/conf.maldet and I cannot find a setting to change which scanner LMD/inotify utilizes for scans?

I have already place CPUQuota and MemoryHighvalues on/lib/systemd/system/clamav-daemon.service, but the settings are ignored by /usr/bin/clamscan`.

How might I choose LMD's scanner and/or limit usr/bin/clamscan cpu/memory usage?

Score:0
tr flag

After testing & reading... it seems using clamdscan over clamscan was an unattainable dream. So, my solution to finally put /usr/bin/clamscan on a leash was to limit the cpu limit usage via a cpulimit command:

#crontab -e add @reboot cpulimit -P /usr/bin/clamscan -l 20

and to edit the clamv-daemon as follows:

#nano /etc/systemd/system/clamav-daemon.service.d/extend.conf

root@admin:~# cat /etc/systemd/system/clamav-daemon.service.d/extend.conf
[Service]
ExecStartPre=-/bin/mkdir -p /run/clamav
ExecStartPre=/bin/chown clamav /run/clamav
MemoryAccounting=true
MemoryHigh=64M
IOSchedulingPriority = 7 
CPUSchedulingPolicy = 5 
MemoryLimit=128M 
CPUQuota=30%
Nice = 19
#

And, /lib/systemd/system/clamav-daemon.service the same as above.

WARNING: NEVER use MemoryMax= with clamav because it will simply kill clamav and prevent it from actually scanning for viruses.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.