Irqbalance / irqbalance

The irqbalance source tree - The new official site for irqbalance

Home Page:http://irqbalance.github.io/irqbalance/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Useless empty log line in journal

tetraf opened this issue · comments

On my system irqbalance is started by systemd so its logs are retrieved by journald. However, irqbalance emits logs containing only line jumps and dashes which seems to correspond to https://github.com/Irqbalance/irqbalance/blob/v1.9.3/irqbalance.c#L292

But this line mentions TO_CONSOLE so I think there is something missing in the log() function.

Especially before this line https://github.com/Irqbalance/irqbalance/blob/v1.9.3/irqbalance.h#L141 (and perhaps the line 154). Maybe something like if (log_mask & mask & TO_SYSLOG).

Everything should be going to the console and systemd should redirect it to its journal.

Questions:

  1. What version of irqbalance are you using?
  2. What happens when you run irqbalance in the foreground manually. Do the logs get printed properly?
  3. What does your irqbalance systemd unit file look like?
  4. Whats the output of journalctl -u irqbalance?

Everything should be going to the console and systemd should redirect it to its journal.

I'm OK with that, but while \n\n\n-----------------------------------------------------------------------------\n may be useful in debug mode for console, it's not (IMHO) for logging.

And:

  1. 1.9.3 (from archlinux repository: https://archlinux.org/packages/extra/x86_64/irqbalance/)
  2. that:
$ sudo systemctl stop irqbalance
$ sudo irqbalance --foreground
[it runs but print nothing after waiting several minutes while doing other stuff]
$ sudo irqbalance --foreground --journal
[same thing for this command]

If I start it with --debug it does print lots of lines (including the famous line-jumps-and-dashes).

  1. this one: https://github.com/Irqbalance/irqbalance/blob/v1.9.3/misc/irqbalance.service
  2. that:
$ journalctl -u irqbalance -n 10 -o cat
Selecting irq 40 for rebalancing



-----------------------------------------------------------------------------
Selecting irq 40 for rebalancing



-----------------------------------------------------------------------------



-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
Selecting irq 40 for rebalancing



-----------------------------------------------------------------------------
Selecting irq 40 for rebalancing



-----------------------------------------------------------------------------

I see what you're saying now, you just don't want the delimiter (-----) in the journal output. Yeah, I definately want to keep that for console logging, but we can turn it off for journal output

please test with #282 and confirm that the issue is resolved

It works fine. No blank line written in logs.
Thank you :)

Sorry for necro-bumping this, but, is there a plan to create a new release including this soon? Or should I tell the maintainers to cherry-pick the commit.

Thanks!

The latter, a new release just came out a few weeks ago

Hi, the issue still exists in 1, and the patch is in irqbalance-1.9.4-2.fc40. Don't know if there is something I missed? Thanks!