ClamWin Free Antivirus Forum Index
ClamWin Free Antivirus
Support and Discussion Forums
Reply to topic
clamscanlog becomes very big in a few time
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
we have clamwin installed on a server.
Clamscanlog becomes very big in a few time because there are many rows for EACH file scanned, in each row there is the expression: "Could not parse regular expression ..."

this is a part of the clamscanlog.txt on disk c:

ERROR: D:\Share\Esa_condivisione\temp\CopiaTemplate_{29DE35E0-0B6E-4515-A9EE-2095193B2371}.rpt: Could not parse regular expression *.vm*.
ERROR: D:\Share\Esa_condivisione\temp\CopiaTemplate_{29DE35E0-0B6E-4515-A9EE-2095193B2371}.rpt: Could not parse regular expression *.wmv.
ERROR: D:\Share\Esa_condivisione\temp\CopiaTemplate_{29DE35E0-0B6E-4515-A9EE-2095193B2371}.rpt: Could not parse regular expression *.ico.
ERROR: D:\Share\Esa_condivisione\temp\CopiaTemplate_{29DE35E0-0B6E-4515-A9EE-2095193B2371}.rpt: Could not parse regular expression *.gif.
etc.
etc.

this is the .bat file associated to disk c:

@echo off
start /low C:\Programmi\ClamWin\App\clamwin\bin\clamscan.exe --database="C:\Programmi\ClamWin\Data\db" --recursive -i --log="C:\Programmi\ClamWin\App\clamwin\bin\ClamScanLog.txt" --move="C:\Programmi\ClamWin\Data\quarantine" -k --show-progress --exclude-dir="D:\share\COMOALTBACKUP" --exclude-dir="C:\Programmi\ClamWin\Data\quarantine" --config-file="C:\Programmi\ClamWin\App\clamwin\bin\Clamwin.conf" --skip-noexe --detect-pua --exclude=*.log --exclude=*.pst --exclude=*.ost --exclude=*.jpg --exclude=*.avi --exclude=*.msi --exclude=*.gif --exclude=*.ico --exclude=*.wmv --exclude=*.vm* C:\

It seems that the same extensions excluded in the .bat file are the same extensions written in the clamscanlog.file , so the log file becomes too big, how can we solve this problem? , please help.
View user's profileSend private message
budtse


Joined: 14 Jan 2006
Posts: 0
Location: Belgium
Reply with quote
Can you check your clamwin filter settings (Preferences > Filters tab) ?

*.vm* is not included by default, maybe someone accidentally put it in ?

Also, on the advanced tab, there is a setting to limit the size of the report file, for example to 1 MB (seems that 1 Meg is the smallest limit you can set, i don't know the technical reason for this).
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
*.vmw is not a correct regular expression syntax you need to use:
--exclude="[^\]*\.vmw$"
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
alch wrote:
*.vmw is not a correct regular expression syntax you need to use:
--exclude="[^\]*\.vmw$"


could be right if I use this expression:

--exclude="*.vmw$"

The error was the missing: "

in the expressions inside the .bat file?
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
budtse wrote:
Can you check your clamwin filter settings (Preferences > Filters tab) ?

*.vm* is not included by default, maybe someone accidentally put it in ?

Also, on the advanced tab, there is a setting to limit the size of the report file, for example to 1 MB (seems that 1 Meg is the smallest limit you can set, i don't know the technical reason for this).



The ClamWin filter settings take effect on the clamscan asctivated by batch file?, so is not necessary to specify the excluded extensions in batch file?
View user's profileSend private message
alch
Site Admin

Joined: 27 Nov 2005
Posts: 0
Reply with quote
no clamwin filters have no effect when you call clamscan outside of clamwin gui (batch file or otherwise)
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
alch wrote:
no clamwin filters have no effect when you call clamscan outside of clamwin gui (batch file or otherwise)


How I can change the syntax in .bat file for the extensions to exclude?
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
Is this the right correction for the .bat file I used?:

@echo off
start /low C:\Programmi\ClamWin\App\clamwin\bin\clamscan.exe --database="C:\Programmi\ClamWin\Data\db" --recursive -i --log="C:\Programmi\ClamWin\App\clamwin\bin\ClamScanLog.txt" --move="C:\Programmi\ClamWin\Data\quarantine" -k --show-progress --exclude-dir="D:\share\COMOALTBACKUP" --exclude-dir="C:\Programmi\ClamWin\Data\quarantine" --config-file="C:\Programmi\ClamWin\App\clamwin\bin\Clamwin.conf" --skip-noexe --detect-pua
--exclude="[^\]*\.log$" --exclude="[^\]*\.pst$"
--exclude="[^\]*\.ost$" --exclude="[^\]*\.jpg$"
--exclude="[^\]*\.avi$" --exclude="[^\]*\.msi$"
--exclude="[^\]*\.gif$" --exclude="[^\]*\.ico$"
--exclude="[^\]*\.wmv$" C:\
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
I put the changes listed above, when i run .bat files clamscan ends after few minutes, no messages in the clamscanlog.

I ask again: the changes listed above in the .bat file are correct?

please someone answer to me. Sad
View user's profileSend private message
adelpin


Joined: 19 Feb 2008
Posts: 0
Location: italy
Reply with quote
this the final version of the .bat file:

@echo off
start /low C:\Programmi\ClamWin\App\clamwin\bin\clamscan.exe --database="C:\Programmi\ClamWin\Data\db" --recursive -i --log="C:\Programmi\ClamWin\App\clamwin\bin\ClamScanLog.txt" --move="C:\Programmi\ClamWin\Data\quarantine" -k --show-progress --exclude-dir="D:\share\COMOALTBACKUP" --exclude-dir="C:\Programmi\ClamWin\Data\quarantine" --exclude="[^\]*\.log$" --exclude="[^\]*\.htm$" --exclude="[^\]*\.msi$" --exclude="[^\]*\.gif$" --exclude="[^\]*\.jpg$" --exclude="[^\]*\.ico$" --exclude="[^\]*\.ost$" --exclude="[^\]*\.pst$" --exclude="[^\]*\.avi$" --config-file="C:\Programmi\ClamWin\App\clamwin\bin\Clamwin.conf" --skip-noexe --detect-pua c:\

This batch file is quite sensitive, a carriage return or a bad space and it doesn't work.

However now It works well!, thanks to everybody.
Very Happy
View user's profileSend private message
GuitarBob


Joined: 09 Jul 2006
Posts: 9
Location: USA
Reply with quote
This would be a good candidate for a FAQ.

Regards,
View user's profileSend private message
b0ne


Joined: 26 Oct 2006
Posts: 0
Reply with quote
Quote:
*.vmw is not a correct regular expression syntax you need to use:
--exclude="[^\]*\.vmw$"


That regular expression is actually broken (backslashes are supposed to be escaped) and results in wasteful time spent backtracing.

The faster and proper version of this regex would be the following: "\.vmw$"

This version does not match the entire string, backtrace to the dot, then match from the dot forwards over the file extension twice.
View user's profileSend private message
clamscanlog becomes very big in a few time
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic