【问题标题】:Is there a way to exclude certain interfaces/address from dbus-monitor output?有没有办法从 dbus-monitor 输出中排除某些接口/地址?
【发布时间】:2012-05-24 14:52:51
【问题描述】:

dbus-monitor 命令的手册页中,我知道我可以使用一些命令行参数,如dbus-monitor "type=..., sender=..., interface=..." 来指定我感兴趣的类型/发送者/接口等。

但是,对于一些我不感兴趣的程序有大量 dbus 流量的情况,是否可以选择过滤掉该接口/程序的输出?

谢谢

【问题讨论】:

  • 您始终可以在 syslog 配置中进行过滤。我不记得细节了,但我认为你可以匹配任意字符串。
  • ??我认为这与syslog 没有任何关系。我只是在谈论dbus-monitor 命令。
  • 哦,抱歉 - 我以为您试图减少某处日志中出现的数据量。

标签: monitor dbus


【解决方案1】:

dbus-daemon 使用消息匹配规则路由消息。你不能有类似“消息不匹配”规则的东西,规范不支持这样的东西。请参阅here 了解更多信息。

为了获得所需的过滤行为,我建议在dbus-monitor 的输出上使用grep。更多信息请查看this discussion

【讨论】:

    猜你喜欢
    • 2017-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-08
    • 2019-12-15
    • 2010-11-04
    • 2021-03-28
    相关资源
    最近更新 更多