Image 01
profile-image

mcmurchy1917

Alexander Kempshall
test
Scan with ClamAV (extended)

Dolphin Service Menus 77 comments

Score 79.2%
Jun 18 2013
Incarus

I understand that this is wanted behaviour and the code should be kept easily maintainable.

All I was pointing out was that there is an overhead that might suggest the progress bar is not working as designed.

So waiting for a reply from Xwang1976 to see if what they see can be explained by the above description.

Alex - Jun 04 2014
I found there was a significant overhead in using clamscan for scanning small numbers of files.

On my system it takes about 7.318 secs to load the dictionary and scan the smallest file in a directory. Whereas if I scan all 11 files in the directory clamscan takes 7.785 secs so really it takes only 0.467 secs to scan the 11 files.

How this may be represented in the progress bar is that it displays the bar waits 7.318 secs at 0% then progresses to 100% in the remaining 0.467 secs them closes. Is this what you see?

I think this was one of the reasons I swapped over to using clamdscan.


In this scenario the progress bar might not register anything for the first 7 secs and then - Jun 03 2014
AS it stands the script ClamScan.sh uses clamscan as the scanner.

As I have clamd running I've amended the script ClamScan.sh to use clamdscan instead. Needed a bit of rework to cater for the differences in the information they write to the log files and of course clamd must be running.

The time to scan has reduced quite significantly. I tested on a directory with 1210 files and 9 sub-directories with a size of 3.2G, in the directory there were 19 infected files. My machine is 10 years old with P4 and 2G of memory.

Using clamscan it took on average 14 mins.

Clamdscan took on average 2.5 minutes.

Not quite sure what to do with it. Let me know whoever might be interested. It doesn't cater for symbolic links. So really this is just a heads up.

Alex - Dec 05 2013
Firstly can I say this is a great tool and note that Incarus has "retired" as maintainer.

However, I've noticed that the progress bar in kdialog doesn't behave correctly.

I believe this patch resolves the issue -

--- ClamScan.sh.clamscan 2013-12-04 16:28:42.137603031 +0000
+++ ClamScan.sh 2013-12-05 10:40:06.303412347 +0000
@@ -8,7 +8,7 @@
files_old=$*
IFS="," #new separator instead of spaces
files=${files_old//\ \//,\/} #from " /" to ",/"
-version="2.5.5"
+version="2.5.8"
title="ClamScan $version"
date="$(date +"%H-%M-%S_%d-%m-%Y")"
path="$(kde4-config --path services)"
@@ -85,7 +85,7 @@
current_lines="0"

progress=$(kdialog --title "$title" --progressbar "$wait
-$scan_sentence $complete_amount ($complete_amount_dir directories)")
+$scan_sentence $complete_amount ($complete_amount_dir directories)" $complete_amount)

#qdbus $progress org.kde.kdialog.ProgressDialog.showCancelButton true
else
- Dec 05 2013