You are not logged in.

#1 2019-06-17 18:33:04

swatquest
Member
Registered: 2013-01-07
Posts: 30

[Solved] clamscan very slow (clamav)

1 txt file - 12 bytes.

# clamscan test.txt
test.txt: OK

----------- SCAN SUMMARY -----------
Known viruses: 6152621
Engine version: 0.101.2
Scanned directories: 0
Scanned files: 1
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 29.178 sec (0 m 29 s)

tested on xfce4, gnome3 ..

service enable:
clamav-freshclam.service                    enabled

version:
local/clamav 0.101.2-1

Last edited by swatquest (2019-06-18 20:03:25)

Offline

#2 2019-06-17 18:44:52

ugjka
Member
Registered: 2014-04-01
Posts: 1,682

Re: [Solved] clamscan very slow (clamav)

What about when you scan scan 100 files? There might be something going that has nothing to do with file count.

Offline

#3 2019-06-17 19:08:21

swatquest
Member
Registered: 2013-01-07
Posts: 30

Re: [Solved] clamscan very slow (clamav)

----------- SCAN SUMMARY -----------
Known viruses: 6152621
Engine version: 0.101.2
Scanned directories: 18
Scanned files: 119
Infected files: 0
Data scanned: 36.84 MB
Data read: 39.79 MB (ratio 0.93:1)
Time: 32.432 sec (0 m 32 s)

almost the same

ok

clamav taking long time to load database

for examples
clamscan -d /var/lib/clamav/main.cvd *

----------- SCAN SUMMARY -----------
Known viruses: 4566249
Engine version: 0.101.2
Scanned directories: 18
Scanned files: 119
Infected files: 0
Data scanned: 36.84 MB
Data read: 39.79 MB (ratio 0.93:1)
Time: 6.648 sec (0 m 6 s)

clamscan -d /var/lib/clamav/daily.cld *

----------- SCAN SUMMARY -----------
Known viruses: 1587619
Engine version: 0.101.2
Scanned directories: 18
Scanned files: 119
Infected files: 0
Data scanned: 36.71 MB
Data read: 39.79 MB (ratio 0.92:1)
Time: 17.571 sec (0 m 17 s)

clamscan -d /var/lib/clamav/bytecode.cvd *

----------- SCAN SUMMARY -----------
Known viruses: 94
Engine version: 0.101.2
Scanned directories: 18
Scanned files: 119
Infected files: 0
Data scanned: 36.67 MB
Data read: 39.79 MB (ratio 0.92:1)
Time: 0.716 sec (0 m 0 s)



Any configuration?
I have to change any settings

Last edited by swatquest (2019-06-17 19:11:08)

Offline

#4 2019-06-17 19:10:40

ugjka
Member
Registered: 2014-04-01
Posts: 1,682

Re: [Solved] clamscan very slow (clamav)

Is this [solved]? Maybe post your CPU/RAM/HDD specs

Offline

#5 2019-06-17 19:14:56

swatquest
Member
Registered: 2013-01-07
Posts: 30

Re: [Solved] clamscan very slow (clamav)

Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)

/dev/sda2      ext4       74G   13G   58G  18% /
/dev/sdb1      ext4       22G  8,0G   12G  40% /var
/dev/sdb2      ext4      963G  186G  728G  21% /home

Offline

#6 2019-06-18 17:31:23

Wild Penguin
Member
Registered: 2015-03-19
Posts: 251

Re: [Solved] clamscan very slow (clamav)

'journalctl -f' while running clamscan?

Check separate logs (if they exist).

I have a vague memory I had something similar, which was down to a misconfiguration, but I don't remember the details. Something like running clamscan causes a db refresh, but was pointing at a non-existent server (or network was down?) - waits for the update, which will eventually bail out. But I could totally misremember. That's why I recommend looking at logs, perhaps there are hints....

Last edited by Wild Penguin (2019-06-18 19:45:08)

Offline

#7 2019-06-18 20:02:50

swatquest
Member
Registered: 2013-01-07
Posts: 30

Re: [Solved] clamscan very slow (clamav)

Wild Penguin

thanks

reading on websites
This is normal clamscan behavior. clamscan needs most of the time to read in all signatures. I doens't matter if you scan one or 1000 files, the time clamscan needs to start is always similar.

solution
load clamav-daemon at boot

systemctl enable clamav-daemon
systemctl start clamav-daemon

then to scan files
clamdscan --multiscan --fdpass directory or file

Offline

#8 2021-11-11 20:19:30

RPX
Member
Registered: 2021-11-11
Posts: 1

Re: [Solved] clamscan very slow (clamav)

It's not a surprise to me, I think that is normal clamscan behavior. This is my scan summary, just finished after 4 days scanning only 101GiB on a USB 3.0 external hard drive (a fast Samsung SSD) using a brand new computer based on an Intel i7 10xxx series with 64GB DRAM.

----------- SCAN SUMMARY -----------
Known viruses: 8573992
Engine version: 0.104.1
Scanned directories: 298991
Scanned files: 2895752
Infected files: 0
Total errors: 71689
Data scanned: 338962.49 MB
Data read: 255505.27 MB (ratio 1.33:1)
Time: 390400.275 sec (6506 m 40 s)
Start Date: 2021:11:07 08:07:32
End Date:   2021:11:11 20:34:13

The 71689 "errors" come from files that it eventually tried to decompress only to later display an error stating that it exceeded the clamscan size limit for compressed files.

With same data on a 15 year old laptop, Intel Core Duo with 4GB SDRAM, and a typical commercial antivirus (Trend Micro) the scanning took less than 3 hours.

Offline

#9 2021-11-11 20:36:25

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,866

Re: [Solved] clamscan very slow (clamav)

Closing this old, solved thread.
@RPX, please read the Code of Conduct and don't necrobump.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB