Discussion:
What dictates when freshclam updates?
Danny Horne
2018-08-01 12:38:48 UTC
Permalink
Hi all,

I've been trying to figure out what dictates the interval at which
freshclam updates the virus database.  It currently updates every three
hours, but I rebooted my server at midnight last night, expecting
updates to be done at 03:00, 06:00 etc., but they started at 05:00, then
08:00 etc.

/etc/freshclam.conf is set to update every hour (for testing purposes),
but this is ignored (guessing I need to set a cron job, but if that's
the case why offer a time interval in the configuration file).

Just trying to understand the update process.
Dominic Raferd
2018-08-01 15:24:32 UTC
Permalink
Post by Danny Horne
Hi all,
I've been trying to figure out what dictates the interval at which
freshclam updates the virus database. It currently updates every three
hours, but I rebooted my server at midnight last night, expecting
updates to be done at 03:00, 06:00 etc., but they started at 05:00, then
08:00 etc.
/etc/freshclam.conf is set to update every hour (for testing purposes),
but this is ignored (guessing I need to set a cron job, but if that's
the case why offer a time interval in the configuration file).
Just trying to understand the update process.
I think it should be determined by freshclam.conf, which in my case is at
/etc/clamav (and is shown as such in my 'man freshclam'). On my system
(Ubuntu 18.04) freshclam is run by systemd (as clamav-freshclam), but it
knows not to run if /etc/cron.d/clamav-freshclam exists (which it doesn't
in my case), as presumably in this case freshclam is being run from cron.
My setting in freshclam.conf is to update every hour (Checks 24) and it
works like that.

You probably have to reload freshclam if you make changes to the
freshclam.conf file. So:
- are you sure you are editing the correct freshclam.conf file?
- did you reload freshclam after making changes to it?
Danny Horne
2018-08-02 08:58:03 UTC
Permalink
Post by Dominic Raferd
I think it should be determined by freshclam.conf, which in my case is
at /etc/clamav (and is shown as such in my 'man freshclam'). On my
system (Ubuntu 18.04) freshclam is run by systemd (as
clamav-freshclam), but it knows not to run if
/etc/cron.d/clamav-freshclam exists (which it doesn't in my case), as
presumably in this case freshclam is being run from cron. My setting
in freshclam.conf is to update every hour (Checks 24) and it works
like that.
You probably have to reload freshclam if you make changes to the
- are you sure you are editing the correct freshclam.conf file?
- did you reload freshclam after making changes to it?
I don't have any such file in systemd for running freshclam.  I do have
a file in /etc/cron.d which calls /usr/share/clamav/freshclam-sleep,
this file does appear to have a random generator built in which might
explain why the 3 hour intervals started at 05:00 rather than 03:00.

Think I'll leave things as they are, it's working so I'm not going to
touch it

Loading...