Disable logging to syslog

I am experimenting with aircrack-ng and I managed to fill up / with the syslog file complaining about what I’m doing to the poor wifi card. How can I disable logging to syslog for the duration of my Bash session?. Of course I would like other, unrelated, processes to continue their logging as necessary.

The /var/log/syslog file looks like this, repeating:

Oct 24 03:39:40 loathe NetworkManager[673]: <error> [1445647180.233086] [platform/nm-linux-platform.c:2782] do_chan     ge_link(): platform-linux: do-change-link: failure changing link 4: Unspecific failure (1)
Oct 24 03:39:40 loathe wpa_supplicant[762]: Could not set interface mon0 flags (UP): Name not unique on network
Oct 24 03:39:40 loathe wpa_supplicant[762]: nl80211: Could not set interface 'mon0' UP
Oct 24 03:39:40 loathe wpa_supplicant[762]: nl80211: deinit ifname=mon0 disabled_11b_rates=0
Oct 24 03:39:40 loathe wpa_supplicant[762]: Could not set interface mon0 flags (UP): Name not unique on network
Oct 24 03:39:40 loathe wpa_supplicant[762]: WEXT: Could not set interface 'mon0' UP
Oct 24 03:39:40 loathe wpa_supplicant[762]: mon0: Failed to initialize driver interface

This is on Kubuntu 15.10.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

syslog is system wide, so you can’t disable syslog on a per session basis.

However, you can

  • copy /etc/rsyslog.conf to /tmp/rsyslog.conf
  • edit /tmp/rsyslog.conf to remove unwanted logging
  • kill rsyslogd (/etc/init.d/rsyslogd stop)
  • run rsyslogd -d -f /tmp/rsyslog.conf for the time of your “session”

at the end of the session

  • kill rsyslogd (find process with ps)
  • run rsyslog (/etc/init.d/rsyslogd start)


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x