Zvi,
Yes, clamscan has a --max-scantime=#n option, which is measured in milliseconds. Clamscan will check the time limit periodically and abort the scan if the time limit has been exceeded. There is a similar config option for clamd in clamd.conf.
Disclaimer: the limit is not precise as clamscan may be busy decompressing or parsing a file in between checks. It’s useful mostly when scanning large archives and such to abort partway through a long scan. Ideally it would monitor the
scan in a watchdog process or something so it could abort the scan more precisely but unfortunately it doesn’t work that way.
Regards,
Micah
From: clamav-users <clamav-users-bounces@lists.clamav.net>
On Behalf Of Zvi Kave via clamav-users
Sent: Monday, December 28, 2020 8:04 AM
To: clamav-users@lists.clamav.net
Cc: Zvi Kave <zvi.kave@gmail.com>
Subject: [clamav-users] Terminate clamscan after specific time
Hi,
Is there a way to Terminate clamscan after specific time with summary ?
Regards,
Zvi