3

I'm using the atmel_mxt_ts module, and it floods my kernel log with useless status messages, about 10 per second. I'm worried this will make my journal massive and cause unnecessary writes to my SSD. Is there any way to silence the output from this module, or at least make it so that the systemd journal ignores it?

Example:

Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:52 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0000:01: Status: 08 
Jun 08 22:44:51 ben-chromebook kernel: atmel_mxt_ts i2c-ATML0001:01: Status: 08 
  • 1
    The questioner did explicitly say the systemd journal itself. – JdeBP Jun 9 '15 at 11:37
  • That's pretty hideous. I'd edit the module code and remove / comment out that printk and recompile the module. – Zan Lynx Jan 27 '17 at 16:11
0

If you are using syslog-ng you can use the filter directive:

filter demo_filter { not match ("atmel_mxt_ts i2c-ATML0000:01: Status: 08"); };

For more details about filtering with syslog-ng see https://www.balabit.com/sites/default/files/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html-single/index.html#filters

If you are using rsyslog you can use for example a property based filter:

:msg, !contains, "atmel_mxt_ts i2c-ATML0000:01: Status: 08"

For more details about filtering with rsyslog see http://www.rsyslog.com/doc/rsyslog_conf_filter.html

In order to broaden the answer and to react to the given comment:

The systemd journal prior to version 216 by default forward messages to syslog, from version 216 on the messages are not forwarded anymore since rsyslog or syslog-ng (from version 3.6) will pull the messages from the journal itself (see https://wiki.archlinux.org/index.php/Systemd/Journal#Journald_in_conjunction_with_syslog).

Also, the journald.conf Storage= directive is set to auto by default which says that the journal is persistent only if the directory /var/log/journal exists (see man journald.conf.

So, by filtering the syslog you should be able to prevent the unwanted writes to the SSD unless you have a persistent journald log. In that case you also need to set the Storage= directive to none or volatile.

  • 1
    This does not affect the systemd journal, as asked about in the question. – JdeBP Jun 9 '15 at 11:38
  • 1
    I'm not using syslog. The journal is already stored in binary on disk, so I don't think this would prevent writes to the SSD. – Ben Davis Jun 9 '15 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.