OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: thenextuser on July 25, 2021, 02:28:21 PM

Title: Log File Loading
Post by: thenextuser on July 25, 2021, 02:28:21 PM
Hello,

I have a problem with my log files.
When I want to view the log files in my OPNsense it takes extremely long and in the meantime the RAM and the SWAP goes up a lot.

A similar problem was already described here with version 20.1:
https://forum.opnsense.org/index.php?topic=16078.msg73538#msg73538 (https://forum.opnsense.org/index.php?topic=16078.msg73538#msg73538)

But the suggested workaround 'opnsense-patch e3774dd' does not work for me.
I get the output here:
root@OPNsense:~ # opnsense-patch e3774dd
Found local copy of e3774dd, skipping fetch.
1 out of 1 hunks failed while patching opnsense/scripts/systemhealth/queryLog.py


What can I do to fix the problem?
Thanks for the help.


Version: 21.1.8_1   
Architecture: amd64   
Flavour: OpenSSL
Title: Re: Log File Loading
Post by: Fright on July 25, 2021, 03:28:33 PM
hi
as you noticed the fix was intended for the 20.1 version.
21.1 already contains it
try to reset the logs (System: Settings: Logging: Reset log files)
Title: Re: Log File Loading
Post by: thenextuser on July 25, 2021, 04:19:21 PM
Hello,


Quote from: Fright on July 25, 2021, 03:28:33 PM
as you noticed the fix was intended for the 20.1 version.
21.1 already contains it
ok that's what I had suspected from, that the fix was not for the version.


Quote from: Fright on July 25, 2021, 03:28:33 PM
try to reset the logs (System: Settings: Logging: Reset log files)
The reset didn't help, but in that settings menu I saw that I had massively increased the size of the log files.

This is probably normally set to 500000Byte so 500KB per logfile (with about 20 logfiles).

I have a lot of space on my harddisk so I thought I can increase the logfile size without any problems and set it to 10000000000Byte so 10GB per file.
(I would have with 500GB on the harddisk theoretically enough free space).

This was probably too much. ::)


Is there a limit here that I should not exceed?
I would like to raise the value already.

Thanks again.
Title: Re: Log File Loading
Post by: Fright on July 25, 2021, 04:34:11 PM
saw that I had massively increased the size of the log files
so you have circular logging enabled
general recommendation to disable circular logging and set the number of days to preserve logs
https://docs.opnsense.org/manual/settingsmenu.html#logging
Title: Re: Log File Loading
Post by: thenextuser on July 25, 2021, 05:10:31 PM
On the same page of the documentation I had read the following and assumed that this would already be set by default:
Quote
Local (non circular) logs

As of OPNsense 20.7 we will change our default logging method from circular logs to regular files. These files will use the following pattern on disk /var/log/<application>/<application>_[YYYYMMDD].log (one file per day).


I will configure it accordingly.

Thank you.
That helped me a lot.