>2/17/14 17 Feb, 12:30:29 Global symbol "$nextlog" requires explicit
package name at assp.pl line 9980.
You forgot to declear $nextlog at the start of the assp.pl script like I
told you.
....
use threads ('yield');
.....
no warnings ....
STDOUT->autoflush;
STDERR->autoflush;
$SIG{ALRM} = sub {};
our $MAINVERSION;
....
our ....
our $nextlog;
Notice: these three lines will fix your 'problem' and possibly your system
will run fine to your needs. There is no question that several features
will not work like expected after implementing this three lines.
To provide a deleayed logging as a feature without any impact to other
features, the central logging concept of assp V2 has to be changed - THIS
WILL NOT HAPPEN!!!
As I wrote - the better solution is to use the syslog feature to provide
the log for fail2ban outside assp.pl.
Thomas
Von: Trevor Jacques <[email protected]>
An: ASSP development mailing list <[email protected]>,
Datum: 17.02.2014 21:44
Betreff: Re: [Assp-test] ASSP log file update frequency
Hi, Thomas.
> I dont have your old code here in vacation - but it should look like
Understood. Thanks for taking the time to reply. I can wait for details
until you’re back home.
> sub mlogWrite {
> return if $WorkerNumber;
> my @m;
> my $items;
> threads->yield();
> &debugWrite();
> threads->yield;
> $items = $mlogQueue->pending();
My assp is, apparently, old enough that $nextlog does not exist in my
version. :-/ Here’s the total of the subroutine, with my attempted
addition:
sub mlogWrite {
my @m;
my $items;
&debugWrite();
#
# 20140217: THJ added next two lines to delay log writing frequency to
help fail2ban. Start small, with 3 seconds
return if $nextlog < time;
$nextLog = time + 3;
#
$items = $mlogQueue->pending();
$refreshWait = time - $lastmlogWrite > 5 ? 5 : 1;
return if (! $items);
@m = $mlogQueue->dequeue_nb($items);
# eval('no bytes;');
no bytes;
my @tosyslog;
while (@m) {
my $line = shift @m;
eval{
$line = Encode::decode('Guess', $line);
} if $line;
print $line unless $silent;
push @tosyslog,substr($line,length($LogDateFormat)) if
($CanUseSyslog || $CanUseNetSyslog) && $sysLog;
w32dbg($line) if ($CanUseWin32Debug);
print $LOG $line if ($logfile && $asspLog && fileno($LOG));
print $LOGBR $line if ($logfile &&
$asspLog &&
fileno($LOGBR) &&
$ExtraBlockReportLog &&
$line =~ /\[\s*spam\sfound\s*\]/io);
if ($line !~ /page:\/maillog/o) {
shift @RealTimeLog if (@RealTimeLog > 33);
push @RealTimeLog, $line;
$lastmlogWrite = time;
}
}
tosyslog('info', \@tosyslog) if ($CanUseSyslog || $CanUseNetSyslog) &&
$sysLog;
# eval('use bytes;');
use bytes;
$MainThreadLoopWait = 1;
}
This provoked a detailed error:
2/17/14 17 Feb, 12:30:29 Global symbol "$nextlog" requires explicit
package name at assp.pl line 9980.
2/17/14 17 Feb, 12:30:29 Global symbol "$nextLog" requires explicit
package name at assp.pl line 9981.
These were the lines I added. I presume my old version of the subroutine
deals with the write time in the next few lines of code.
When you have a moment, and if you have any ideas, I’d be really grateful.
Don’t take time away from your vacation, though.
All the best,
T.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test