dhclient 日志中充斥着无用信息

dhclient 日志中充斥着无用信息

dhclient我在 Debian ( isc-dhcp-client, ) 上使用isc-dhcp-common

正在记录的日志dhclient充斥着版权信息和其他无用的东西(“请查阅自述文件”,“请访问 http://...”)

简单的dhcp会话如下所示:

dhclient:  Internet Systems Consortium DHCP Client 4.2.2
dhclient:  Copyright 2004-2011 Internet Systems Consortium.
dhclient:  All rights reserved.
dhclient:  For info, please visit https://www.isc.org/software/dhcp/
dhclient:  
dhclient:  Listening on LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   Socket/fallback
dhclient:  DHCPRELEASE on wlan0 to 192.168.0.1 port 67
dhclient:  send_packet: Network is unreachable
dhclient:  send_packet: please consult README file regarding broadcast address.
dhclient:  Internet Systems Consortium DHCP Client 4.2.2
dhclient:  Copyright 2004-2011 Internet Systems Consortium.
dhclient:  All rights reserved.
dhclient:  For info, please visit https://www.isc.org/software/dhcp/
dhclient:  
dhclient:  Listening on LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   Socket/fallback
dhclient:  DHCPRELEASE on wlan0 to 192.168.0.1 port 67
dhclient:  send_packet: Network is unreachable
dhclient:  send_packet: please consult README file regarding broadcast address.
dhclient:  Internet Systems Consortium DHCP Client 4.2.2
dhclient:  Copyright 2004-2011 Internet Systems Consortium.
dhclient:  All rights reserved.
dhclient:  For info, please visit https://www.isc.org/software/dhcp/
dhclient:  
dhclient:  Listening on LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   LPF/wlan0/aa:bb:cc:dd:ee:ff
dhclient:  Sending on   Socket/fallback
dhclient:  DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
dhclient:  DHCPREQUEST on wlan0 to 255.255.255.255 port 67
dhclient:  DHCPOFFER from 192.168.0.1
dhclient:  DHCPACK from 192.168.0.1
dhclient:  bound to 192.168.0.16 -- renewal in 36865 seconds.

重要的信息混杂着垃圾。这对我来说是一个问题,因为我正在转发重要的日志(包括dhclient),并将它们显示在后台。由于dhclient经常更新租约,日志很快就会变得很长。然后我必须向上滚动才能看到其他日志。

是否可以隐藏垃圾,只保留相关信息?

相关内容