There's a long history of confusing discussions about this over on OpenWRT, but does anyone know what the current situation is with logd here in terms of a) increasing the log size from the default of 16KB, and b) actually being able to read larger sizes assuming they exist (there was some discussion about logread not going past 45KB)?
The control for this (short of editing /etc/init.d/log, which I don't think is a good idea) seems to be /etc/config/system ('system' section). There you can add lines like:
option log_buffer_size '32'
option log_size '32'
What is the difference between those two? I have no idea, but I think the first one may be the right one, since when you add just that line you can see the direct effect in memory in the logd process when you run 'ps' (assuming you restart logging: "/etc/init.d/log restart").
(It changes from -S 16 to -S 32.)
And then there's logread itself, which has this switch for some reason. Why would a logreader need to be provided the size of what it's about to read? Clearly I'm missing something.
-S <bytes> Log size
Anyway, if anyone has a handle on this, it would be great to clear all this up.
Log size
Moderator: Moderators
Re: Log size
log_buffer_size sets the ring buffer (RAM) size that the system logs to. This is affecting "logd"
log_size sets the file size of logs going to a file. This is acting on "logread".
You definitely want to modify these using the system config. Not by modifying init scripts.
log_size sets the file size of logs going to a file. This is acting on "logread".
You definitely want to modify these using the system config. Not by modifying init scripts.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Log size
OK, so for the purposes of the System log menu (which may or may not use logread, it's hard to tell) and the Email plugin (which definitely does), would the first command be sufficient?
For the log to be written to a file, I thought "option log_file '/var/log/syslog'" was necessary. That's not a default line, however, and I doubt many use it.
For the log to be written to a file, I thought "option log_file '/var/log/syslog'" was necessary. That's not a default line, however, and I doubt many use it.
Re: Log size
They both use logread yes.
Yes I believe so. If you're trying to increase the number of lines logread outputs then increasing the ring should do that.
Test and see i reckon
Correct you need that line to point it at a file.
Yes I believe so. If you're trying to increase the number of lines logread outputs then increasing the ring should do that.
Test and see i reckon
Correct you need that line to point it at a file.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.