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

Add --quiet flag to suppress log spam #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KogasaPls
Copy link

This pull request adds a --quiet flag to suppress log spam, fixing #22 (which has been noted by many others for the last decade). Specifically, it suppresses three types of messages:

"Supervising _ threads of _ processes of _ users."
"Successfully made thread _ of process _ owned by _ high priority at nice level _."
"Successfully demoted thread _ of process _."

These messages (especially the first two) are responsible for an annoyingly large amount of journal spam. It is convenient to have the ability to turn them off, but I have made no changes to the default behavior.

image

Suppresses "Supervising n threads...", "Successfully made thread RT",
and "Successfully demoted thread" messages.
@@ -857,7 +865,7 @@ static void reset_known(void) {
if (verify_process_user(u, p) >= 0 &&
verify_process_starttime(p) >= 0 &&
verify_thread_starttime(p, t) >= 0)
if (thread_reset(t->pid) >= 0) {
if (thread_reset(t->pid) >= 0 && !log_quiet) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional log_quiet check here may cause n_demoted++ to be erroneously skipped, affecting a log message which is still issued below:

syslog(LOG_NOTICE, "Demoted %u threads.\n", n_demoted)

@@ -951,7 +959,7 @@ static int reset_all(void) {

if (r == SCHED_FIFO || r == SCHED_RR ||
r == (SCHED_FIFO|SCHED_RESET_ON_FORK) || r == (SCHED_RR|SCHED_RESET_ON_FORK))
if (thread_reset((pid_t) tid) >= 0) {
if (thread_reset((pid_t) tid) >= 0 && !log_quiet) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above

@jacobmcnamee
Copy link

rtkit is significantly more verbose than other services even when it has nothing useful to share. I have pages and pages of this:

rtkit-daemon[4850]: Supervising 0 threads of 0 processes of 0 users.

This PR has been open for almost a year. Is there anything preventing its merge?

@jacobmcnamee
Copy link

Alternative solution for systemd users: #22 (comment)

@TriMoon
Copy link

TriMoon commented Dec 21, 2022

Thanks, i'm also using the following, which eliminates the debug-level messages that generate the "Supervising" ones 😉

IMHO this setting, in the drop-in, should be shipped by default, which would eliminate the need for this PR 🖖
(See: #31)


# /etc/systemd/system/rtkit-daemon.service.d/override.conf
[Service]
LogLevelMax=info

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

Successfully merging this pull request may close these issues.

3 participants