我收到了一个警告,即根目录正在耗尽空间。在使用ncdu进行检查时,我发现/var/log文件夹占用了大量空间。进一步的检验表明,syslog和kern.log占用了太多的空间。因此,我跟踪了这两个日志,并发现它们的写入速度太快,而且我的问题是,每一行的日志信息都是相似的,在超过300行中,我手动检查了日志信息
Sep 10 00:50:02 amsabots kernel: [ 2421.158588] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.158645] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.158703] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.158738] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164080] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164226] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164266] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164324] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164384] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164443] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164503] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164545] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164583] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164688] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164782] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164842] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164900] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.164960] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.165020] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.165078] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.165138] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.165175] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.170990] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171140] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171188] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171290] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171338] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171381] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171500] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171646] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171739] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171799] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171858] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171917] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.171976] dpc 0000:00:1d.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
Sep 10 00:50:02 amsabots kernel: [ 2421.172033] dpc 0000:00:1^C关于如何解决这个问题,我已经经历过多个解决方案,但似乎没有一个真正提供解决方案。我想进一步澄清的建议如下:
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}对上述更改的影响有何建议?
发布于 2021-09-10 01:32:41
首先安装stacer下一步:打开stacer和goto“系统清洁器”,然后单击"Select“,然后单击上面的蓝色butten。然后单击"Select“,然后单击蓝色的butten。输入您的密码并完成。
https://askubuntu.com/questions/1362856
复制相似问题