On Tuesday 26 September 2006 00:03, Gerard Seibert wrote:
> I installed the clamstats-0.2.pl program because it was listed on this
> forum recently. Prior to actually running it, I cleaned out the
> clamd.log file.
>
> The program is producing an error message. This is the out put of one
> such incident.
>
> Script started on Mon Sep 25 18:57:55 2006
> Use of uninitialized value in substitution (s///) at ./clamstats.pl line
> 133. Use of uninitialized value in concatenation (.) or string at
> ./clamstats.pl line 163. Use of uninitialized value in concatenation (.) or
> string at ./clamstats.pl line 166. Script done on Mon Sep 25 18:57:55 2006

These errors will most likely disappear once there is some data passing 
through, but if not comment out the 'use strict' line and remove '-w' from 
the first line in the script, that should stop it. They are more warnings 
than errors, not serious

>
> I had to change the 'clamd_update.log' to 'freshclam.log' in order to
> get the script to even run.

Generic scripts almost always have to be edited to get them to point to the 
right paths, different installs keep things in different places.

>
> I know this is not a Perl forum, but I thought that perhaps someone
> might have an idea what is wrong with this script. I downloaded it from:
>
>      http://weblog.infoworld.com/venezia/archives/clamstats.pl
>
> I have a FreeBSD 6.1 STABLE system with Perl 5.8.8 loaded.
>
> If anyone can assist me, I would appreciate it.

as you can see in the top 20 lines of code, there are a few things you can 
edit to change the behaviour of the script,

my $logfile = "/var/log/clamav/clamd.log";
my $fclogfile = "/var/log/clamav/clamd_update.log";
my $host = `hostname`;

my $text = "1";
my $html = "";

and you can run it with a parameter
clamstats.pl --html

HTH
-- 
-----------------
Bob Hutchinson
Midwales dot com
-----------------
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to