Hi all,
A real newbee question !
On reboot, clamd
runs for about 2-3 minutes and takes a lot pf CPU time.
I am on a LOCAL VM testing Jitsi and I have to reboot often.
How can I disable clamd
until I finish debugging Jitsi ?
Thank you,
Michel-André
dnutan
(Marc)
May 8, 2021, 10:59pm
2
Do not recall if the service is listed and manageable from the Services section on the server-manger. From command line I guess it is:
systemctl stop clamd
systemctl disable clamd
Hi @dnutan ,
Thank you for your reply.
# systemctl stop clamd
Failed to stop clamd.service: Unit clamd.service not loaded.
#
At last, I found something: https://docs.iredmail.org/completely.disable.amavisd.clamav.spamassassin.html .
# systemctl disable --now clamd@amavisd
#
# yum remove clamav clamav-lib
...
Résumé de la transaction
============================================================================================
Supprimer 2 Paquets (+7 Paquets en dépendance)
Taille d'installation : 12 M
...
Supprimé :
clamav.x86_64 0:0.103.2-1.el7 clamav-lib.x86_64 0:0.103.2-1.el7
Dépendances supprimées :
clamav-unofficial-sigs.noarch 0:7.2.4-1.el7
clamav-update.x86_64 0:0.103.2-1.el7
clamd.x86_64 0:0.103.2-1.el7
nethserver-antivirus.noarch 0:1.5.1-1.ns7
nethserver-clamscan.noarch 0:1.0.3-1.ns7.sdl
nethserver-mail-filter.noarch 0:2.30.0-1.ns7
nethserver-mail-quarantine.noarch 0:2.30.0-1.ns7
Terminé !
#
# reboot
No more clamd and now booting is much faster.
To re-install, just install back clamav
and clamav-lib
.
Michel-André
1 Like
Hi @michelandre ,
Please use the following variant to mark a topic as solved:
Now we have an amazing feature on our community platform which helps to mark a topic as SOLVED
As the OP (topic creator) you will have a button that allows you to accept an answer
[image]
Accepted answers are highlighted in the topic list:
[image]
Accepted answers are highlighted on the initial topic:
[image]
This kind of action is enabled only for topic into the Support category
Happy support!
stephdl
(Stéphane de Labrusse)
May 10, 2021, 12:51pm
5
clamd is used by nethserver-mail-filter, nethserver-clamscan, nethserver-squid … , when you update the database it takes a long time
1 Like
Salut Stéphane,
Thank you for the clarification that it was the update that was the trouble and not a scan.
Instead of restoring the previous snapshot (for which clamd
was not up to date) , I should have let it go for the update, take a new snapshot, boot the new snapshot and it would not have updated again.
Michel-André
1 Like
stephdl
(Stéphane de Labrusse)
May 10, 2021, 1:50pm
7
Bonjour michel-andré
Indeed, it is a pity, nightmare when I test something on my VM with nethserver-mail-filter, at boot time the VM is so slow, until I kill clamd
Something to know
1 Like
Salut Stéphane.
Even with a new snapshot, clamd wants to update…
Michel-André
stephdl
(Stéphane de Labrusse)
May 10, 2021, 3:51pm
9
what version of clamd is runing : for rspamd, squid ???
# rpm -qa | grep rspamd
rspamd-2.5-156.x86_64
# rpm -qa | grep squid
#
# rpm -qa | grep nethserver-squid
#
# rpm -qa | grep spamd
rspamd-2.5-156.x86_64
Thank you for your support.
Michel-André
stephdl
(Stéphane de Labrusse)
May 10, 2021, 4:00pm
11
systemctl disable clamd@rspamd.service
systemctl stop clamd@rspamd.service
# systemctl disable clamd@rspamd.service
#
# systemctl stop clamd@rspamd.service
#
After a reboot: from 25% to 78% CPU for clamd
.
But if I do those commands right after the reboot
, then clamd
is no more in the picture.
So, your solution is working.
I’ll do like my teacher used to at my primary school: stick a little angel and a star beside you name on my list of “The Greatest”.
Michel-André
1 Like