[clamav-users] ClamAV Scan - Data Read vs Data Scanned
G.W. Haywood
clamav at jubileegroup.co.uk
Mon Nov 2 17:46:17 UTC 2020
Hi there,
On Mon, 2 Nov 2020, Paul Kosinski via clamav-users wrote:
> ... I still think it is a bad message that should be fixed.
+1
If you want to try a very quick and dirty tweak to get more precise
numbers, change the value of
1) CL_COUNT_PRECISION in .../libclamav/clamav.h from 4096 to 1
2) replace '1024' with '1' in four places in clamscan/clamscan.c
3) change 'MB' to 'Bytes' in two places in clamscan/clamscan.c and
4) rebuild.
8<----------------------------------------------------------------------
~/clamav-0.103.0-rc2: $ grep -C3 -r CL_COUNT_PRECISION clamscan libclamav | ...
...
...
clamscan/clamscan.c: mb = info.blocks * (CL_COUNT_PRECISION / 1024) / 1024.0;
clamscan/clamscan.c: logg("Data scanned: %2.2lf MB\n", mb);
clamscan/clamscan.c: rmb = info.rblocks * (CL_COUNT_PRECISION / 1024) / 1024.0;
clamscan/clamscan.c: logg("Data read: %2.2lf MB (ratio %.2f:1)\n", rmb, info.rblocks ? (double)info.blocks / (double)info.rblocks : 0);
...
...
libclamav/clamav.h:#define CL_COUNT_PRECISION 4096
...
...
8<----------------------------------------------------------------------
This is untested, YMMV. Obviously, if you're skilled in the art, this
can be done better. Note that 'MB' should in any case be 'MiB' as the
values printed are the counts divided by 2^20 and not by 10^6.
--
73,
Ged.
More information about the clamav-users
mailing list