LoginSignup
0
0

More than 5 years have passed since last update.

特定 の program からの log出力 を 無効化 (filter) 〜 wpa_supplicant の log を 停止 例 〜

Posted at

Overview

特定 の program からの log出力 を 無効化 (filter)する例として、wpa_supplicant の log出力を止めてみます

wpa_supplicant が /var/log/syslog に

wpa_supplicant[962]: wlan0: Failed to initiate sched scan
wpa_supplicant[962]: wlan0: Failed to initiate sched scan
wpa_supplicant[962]: wlan0: Failed to initiate sched scan
wpa_supplicant[962]: wlan0: Failed to initiate sched scan
wpa_supplicant[962]: wlan0: Failed to initiate sched scan
wpa_supplicant[962]: message repeated 5 times: [ wlan0: Failed to initiate sched scan]

みたいに定期的に /var/syslogに書き続けるのを 抑制(フィルター) する例です

/etc/rsyslog.d/filter.conf
if $programname == 'wpa_supplicant' then ~

~ は、捨てるの意味です。
その代わりに、/tmp/wpa_log みたいにして、特定のファイルに書き出すことも可能です.

詳しくは、 $ man rsyslog 参照のこと。

$ sudo systemctl restart rsyslog
$ sudo systemctl status rsyslog

みたいにして、再起動および確認しておきましょう。

みたいにすればできます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0