![为什么 logwatch 在全新安装的 Ubuntu 18.04 服务器上处理 sshd 时挂起?](https://linux22.com/image/916782/%E4%B8%BA%E4%BB%80%E4%B9%88%20logwatch%20%E5%9C%A8%E5%85%A8%E6%96%B0%E5%AE%89%E8%A3%85%E7%9A%84%20Ubuntu%2018.04%20%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E5%A4%84%E7%90%86%20sshd%20%E6%97%B6%E6%8C%82%E8%B5%B7%EF%BC%9F.png)
$ sudo logwatch --service sshd --debug 100 --output stdout
...
TimeFilter: Period is day
TimeFilter: SearchDate is (2019-10-13T..:..:..\.[0-9]+[+-][0-9]{2}:[0-9]{2} )
TimeFilter: Debug SearchDate is (2019-10-13T \ [0-9]+[+-][0-9]{2} [0-9]{2} )
DEBUG: Inside ApplyStdDate...
DEBUG: Looking For: (Oct 13 ..:..:.. )
DEBUG: Looking For: (2019-10-13T..:..:..\.[0-9]+[+-][0-9]{2}:[0-9]{2} )
export LOGWATCH_LOGFILE_LIST='/var/log/auth.log /var/log/auth.log.1 '
export LOGWATCH_ARCHIVE_LIST='/var/log/auth.log.2.gz /var/log/auth.log.3.gz /var/log/auth.log.4.gz '
Processing Service: sshd
( cat /var/cache/logwatch/logwatch.xV7LYbVy/secure | /usr/bin/perl /usr/share/logwatch/scripts/shared/onlyservice 'sshd' |/usr/bin/perl /usr/share/logwatch/scripts/shared/removeheaders '' |/usr/bin/perl /usr/share/logwatch/scripts/services/sshd) 2>&1
TimeFilter: Period is day
TimeFilter: SearchDate is ( 2019-Oct-13 ..h ..m ..s )
TimeFilter: Debug SearchDate is ( 2019-Oct-13 h m s )
就是这样。它挂了。该文件/var/cache/logwatch/logwatch.xV7LYbVy/secure
中有一堆日志信息。
如果我说它--service kernel
立即正常完成。我正在运行 Logwatch 7.4.3(发布于 2016 年 12 月 7 日)