簡潔なバージョン:

簡潔なバージョン:

簡潔なバージョン:

私のシステムログに次のメッセージが表示されないようにしたいと思います。これはキーボードのUSBポートに関連しているので無視できます。

Feb  9 23:33:45 sunfire kernel: [ 8163.156041] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci   

/etc/rsyslog.d/50-default.confフィルタを編集して追加しました。

:msg, contains, "3-6.2.4: reset full"

サービスを再起動すると、/etc/init.d/rsyslog restart結果は次のようになります。

Feb 10 00:23:57 sunfire rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="754" x-info="http://www.rsyslog.com"] exiting on signal 15.
Feb 10 00:23:57 sunfire rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="3982" x-info="http://www.rsyslog.com"] start
Feb 10 00:23:57 sunfire rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
Feb 10 00:23:57 sunfire rsyslogd-2207: error during parsing file /etc/rsyslog.conf, on or before line 62: syntax error on token '' [v8.16.0 try http://www.rsyslog.com/e/2207 ]
Feb 10 00:23:57 sunfire rsyslogd-2207: CONFIG ERROR: could not interpret master config file '/etc/rsyslog.conf'. [v8.16.0 try http://www.rsyslog.com/e/2207 ]
Feb 10 00:23:57 sunfire rsyslogd: rsyslogd's groupid changed to 109
Feb 10 00:23:57 sunfire rsyslogd: rsyslogd's userid changed to 105
Feb 10 00:23:57 sunfire systemd[1]: Stopping System Logging Service...
Feb 10 00:23:57 sunfire systemd[1]: Stopped System Logging Service.
Feb 10 00:23:57 sunfire systemd[1]: Starting System Logging Service...
Feb 10 00:23:57 sunfire systemd[1]: Started System Logging Service.
Feb 10 00:23:57 sunfire rsyslogd-2039: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
Feb 10 00:23:57 sunfire rsyslogd-2007: action 'action 10' suspended, next retry is Wed Feb 10 00:24:27 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]
Feb 10 00:25:49 sunfire kernel: [11287.416037] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci

どうやら止めたい録音が止まらなかったようだ。

私はこの問題をあまりにも扱う前にいくつかの助けを得るべきだと思いました。

ありがとうございます。

長いバージョン:

私のボックスに接続すると、システムログにエラーを報告するキーボードがあります(主に14.04 LTS、Raspian、OSX、およびFreeBSDでUbuntuのさまざまな繰り返し実行)。エラーは具体的には次のとおりです。

Feb  9 23:33:45 sunfire kernel: [ 8163.156041] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:33:49 sunfire kernel: [ 8166.828038] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:33:55 sunfire kernel: [ 8172.804042] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:34:00 sunfire kernel: [ 8178.172050] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:34:23 sunfire kernel: [ 8201.524041] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:35:19 sunfire kernel: [ 8257.340041] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:35:32 sunfire kernel: [ 8270.244043] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci
Feb  9 23:35:50 sunfire kernel: [ 8287.876038] usb 3-6.2.4: reset full-speed USB device number 8 using ehci-pci

(頻度と一貫性を示すためにあまりにも多くをリストしました。)

私は基本的に気にしないので、システムにそのようなレポートを「無視する」方法を探していました。その理由は、このキーボードはUSBポートが2つですが、何も接続したことがないからです(特にこのボックスにはありません。メインボックスと一緒に使用するときはマウスが接続されています)。

私が見つけたほとんどの答えは、通常、検索、特定のアプリケーション、または開発者のシナリオでの出力フィルタリングに関連しています。

この質問/回答を見つけました(システムログのロギングを無効にする)、しかし私の(Ubuntu)システムの設定はその中にある追加の設定ファイルを指しており、/etc/rsyslog.d/これらのファイルのどれも(私に)何かを無視する方法をリモートで提案しません。

これにより、追加の検索パスが(/var/log/syslog への出力防止) 続行します。http://www.rsyslog.com/(特別なフィルター)しかし、使用を開始したときに間違った設定でエラーが発生し、明らかに不要なメッセージは選択されていません(上記の「短い」部分)。

rsyslogが停止しているようだ(pid:754)を考えると、正しいシステムを攻撃していますが、間違った方法で攻撃しています。

どんな助けでも大変感謝します。

最終追加:デフォルト設定に戻して再起動すると、5つの設定エラーのうち3つが持続し、互いに関連性がないと思いました。

つまり、次が続きます。

Feb 10 00:48:12 sunfire rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ]
Feb 10 00:48:12 sunfire rsyslogd-2039: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ]
Feb 10 00:48:12 sunfire rsyslogd-2007: action 'action 10' suspended, next retry is Wed Feb 10 00:48:42 2016 [v8.16.0 try http://www.rsyslog.com/e/2007 ]

以下は(予想)もはや存在しません。

Feb 10 00:23:57 sunfire rsyslogd-2207: error during parsing file /etc/rsyslog.conf, on or before line 62: syntax error on token '' [v8.16.0 try http://www.rsyslog.com/e/2207 ]
Feb 10 00:23:57 sunfire rsyslogd-2207: CONFIG ERROR: could not interpret master config file '/etc/rsyslog.conf'. [v8.16.0 try http://www.rsyslog.com/e/2207 ]

ベストアンサー1

使用

:msg, contains, "3-6.2.4: reset full" ~

チルダは、「3-6.2.4:リセット完了」文字列を含むメッセージを削除します。

次のようなものを使用したい場合があります。本当に見たいことを落とすシナリオを想像できます。次のコマンドは、メッセージ本文に「reset full-speed」を含むカーネルからのメッセージを見つけて、syslogにこれらのメッセージを削除するように指示します。

if ($programname == 'kernel:') and ($msg contains "reset full-speed") then { *.* ~ }
& stop

おすすめ記事