Hi there,

On Sun, 13 Feb 2022, Marc wrote:
On Wed,  9 Feb 2022, G.W. Haywood wrote:
On Wed,  9 Feb 2022, Marc wrote:
Is there a command that can make a running freshclam daemon do an update
request instantly?

SIGUSR1, assuming it's compiled with it enabled.

Yes thanks, I was already trying with this command

kill -s SIGUSR1 $(pidof freshclam)

However it gets the wrong pid from the container environment where I have these 
processes listed

clam     4051769 4051758  0 16:27 ?        00:00:00 [freshclam] <defunct>
clam     4051770       1  0 16:27 ?        00:00:04 freshclam -d

If I start freshclam -d in the docker testing environment I do not have this first 
proces '[freshclam] <defunct>'. Any idea what this can be?

Often what happens when a daemon starts up is that the parent forks a
child with the right permissions etc. and the parent then exits.  This
can leave a defunct process until it's cleaned up.  There's no need to
worry about it.  The PPID (parent process ID) of the child will be the
PID of the parent until the parent exits, but after that the PPID of
the child is the PID of the 'init' process (or whatever passes for the
'init' process on your system - systemd?) which will usually be PID 1.

I have no experience with managing processes in Docker, but there's an
optional 'PidFile' directive in the freshclam configuration file from
which you might get the number you need if you configure freshclam to
write it there.

Alternatively, as Mr. Aitchison suggested, you could start freshclam
whenever you want it to update and let it terminate.  So instead of
running it as a daemon you might for example want to run it from cron.

Why do you need to do this?  Most people seem to be happy enough with
a couple of updates per day, and if you hit the CDN too hard you could
easily find yourself blacklisted.  I recommend that you let freshclam
do what it's designed to do.  It's pretty good at it.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml

Reply via email to