[BlueOnyx:25877] Re: Real Time access analysis (and better stats)
Juerg Sommer
jsommer at emailto.ch
Fri Dec 30 07:26:04 -05 2022
Hi Michael,
>>> I guess it'll work. Until you eventually try to shove several
>>> gigabytes of logfiles through it to parse. :o)
>>
>> I agree, large logfiles are a problem with variables...
>>
>> The problem is line ~170 (I modified the script)
>> system("$GoAccess_cmd $go_access_params");
>>
>> This is called BEFORE <STDIN> loop in ~270:
>> while (my $line = <STDIN>) {
>>
>> GoAccess grabs the STDIN run on command line (both way "cat xy |
>> script" or "script < xy")
>
>
> Ah, ok. I see your point. And it's a good point. But I still don't
> want to stuff the whole Apache access_log into a variable as that
> might blow up in our face if the logfile snippet is large. And that
> might easily happen.
>
> So how about this:
>
> https://devel.blueonyx.it/trac/changeset/4464/
>
> In that change I moved the whole (first) GoAccess parsing block behind
> any STDIN processing and that runs off the (copied) logfile itself
> anyway and doesn't need STDIN anyway.
>
> I think that should work better.
>
Thanks also for this bugfix. Perfect, when I change the scripts I tried
to change as less as possible, because I don't want to debug the whole
script (and check if your GoAccess Part is required later). But move it
to bottom is perfect: now it also works like a charm when executed
manually and we don't habe to store the (maybe large) STDIN in a variable.
Regards,
Juerg
More information about the Blueonyx
mailing list