Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-r flag and flooding of log #177

Closed
IlyaIndigo opened this issue Mar 21, 2020 · 9 comments
Closed

-r flag and flooding of log #177

IlyaIndigo opened this issue Mar 21, 2020 · 9 comments

Comments

@IlyaIndigo
Copy link

IlyaIndigo commented Mar 21, 2020

Problem. earlyoom floods the /var/log/messages log with unnecessary memory status messages.
I want to see only events sending signals to processes in the log.
Does the -r flag affect only the state of memory logging, or also the frequency of polling the memory?
Will -r0 earlyoom work correctly?

@IlyaIndigo
Copy link
Author

Apparently, it does not affect the polling frequency, but only on logging.
Why is logging of memory state every second turned on by default?
This is for debugging only!
Many people think that this flag depends on the polling frequency for sending signals to processes.
I propose to set it to 0 by default and to emphasize in the manual that this parameter only affects logging and does not affect the actual polling rate.

@rfjakob
Copy link
Owner

rfjakob commented Mar 21, 2020

Yes 0 works, and this is documented in https://github.com/rfjakob/earlyoom/blob/master/MANPAGE.md#-r-interval .

The default when running as a service is 60 seconds, but you can customize it to your likings:
https://github.com/rfjakob/earlyoom/blob/master/earlyoom.default#L5

@IlyaIndigo
Copy link
Author

man earlyoom
-r INTERVAL
memory report interval in seconds (default 1), set to 0 to disable completely. With earlyoom
v1.2 and higher, floating point numbers are accepted. Due to the adaptive poll rate, when there
is a lot of free memory, the actual interval may be up to 1 second longer than the setting.

The emphasis is on the fact that in 1.2+ you can use decimal numbers, and not on the fact that this affects ONLY logging and does not affect the operation of the service.

@hakavlad
Copy link
Contributor

@IlyaIndigo https://github.com/rfjakob/earlyoom#configuration-file

Default in the config:

EARLYOOM_ARGS="-r 60"

See also #171.

@IlyaIndigo
Copy link
Author

Well, at least fix it in the man page.
And also think about why system administrators, looking at the logs, see this even every 60 seconds, that is, that is, flipping a log for a day, 1440 lines more per day and 433200 lines per month?

rfjakob added a commit that referenced this issue Mar 22, 2020
Make it clear that -r does not affect actual low-memory
killing.

#177
rfjakob added a commit that referenced this issue Mar 22, 2020
As there have now been two complaints about the default
log output being too noisy, I'll have to accept that
other users find the memory reports less interesting
than I do :)

Increase from 60 seconds to 3600 seconds (one memory
report per hour)

#171
#177
@rfjakob
Copy link
Owner

rfjakob commented Mar 22, 2020

I tried to make the man page clearer ( c1180be ) and I set -r 3600 in the earlyoom service config file earlyoom.default e1c74d9

Thanks

@rfjakob rfjakob closed this as completed Mar 22, 2020
@hakavlad
Copy link
Contributor

thanks

@IlyaIndigo
Copy link
Author

IlyaIndigo commented Mar 22, 2020

c1180be (default 1.0)

Change please to (default 3600.0)

@rfjakob
Copy link
Owner

rfjakob commented Mar 22, 2020

When you execute earlyoom without parameters, the default is used, which is unchanged: 1 second

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants