如何修复 /var/log 文件夹的定期填充?

如何修复 /var/log 文件夹的定期填充?

kernlog/var/log 有两个文件,每个文件 12GB ,这是本月第二次了syslog。这是由于journaldCPU 超过 100% 造成的。我再次手动删除了这些文件,并将 journalctl vaccum 大小设置为 200M,但我担心这个问题可能会再次发生。有人能帮忙吗?

另一件事是,它突然/var/lib/snapd占用了 var 上的大部分空间。有没有安全的方法来清理它?我认为我根本没有使用 snap。

编辑今天 (14.09) 又发生了这种情况。
输出tail kern.log

Sep 14 16:47:35 mauni kernel: [ 4722.451831]  cfg80211_leave+0x2c/0x40 [cfg80211] 
Sep 14 16:47:35 mauni kernel: [ 4722.451845] cfg80211_netdev_notifier_call+0x1b2/0x590 [cfg80211] 
Sep 14 16:47:35 mauni kernel: [ 4722.451847]  ? wake_up_klogd.part.0+0x34/0x40 
Sep 14 16:47:35 mauni kernel: [ 4722.451849]  ? vprintk_emit+0x18c/0x290 
Sep 14 16:47:35 mauni kernel: [ 4722.451851]  ? vprintk_default+0x29/0x50 
Sep 14 16:47:35 mauni kernel: [ 4722.451853]  ? vprintk_func+0x4c/0xbc 
Sep 14 16:47:35 mauni kernel: [ 4722.451868]  ? ieee80211_reconfig+0xd3/0x1170 [mac80211] 
Sep 14 16:47:35 mauni kernel: [ 4722.451872]  ? rtnl_is_locked+0x15/0x20 
Sep 14 16:47:35 mauni kernel: [ 4722.451876]  ? inetdev_event+0x47/0x560 
Sep 14 16:47:35 mauni kernel: [ 4722.4518  

并输出tail syslog

Sep 14 16:57:15 mauni kernel: [ 5302.079069] Modules linked in: vmw_vsock_vmci_transport vsock vmw_vmci ccm binfmt_misc uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel mei_hdcp iwldvm kvm snd_hda_intel snd_intel_dspcfg mac80211 crct10dif_pclmul ghash_clmulni_intel snd_hda_codec libarc4 thinkpad_acpi snd_hda_core snd_hwdep aesni_intel snd_pcm crypto_simd nvram cryptd glue_helper ledtrig_audio snd_seq_midi snd_seq_midi_event iwlwifi snd_rawmidi snd_seq rapl intel_cstate i915 cfg80211 snd_seq_device snd_timer drm_kms_helper mei_me joydev input_leds snd mei i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt soundcore mac_hid serio_raw wmi_bmof nf_log_ipv6 ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_LOG xt_limit xt_addrtype xt_tcpudp xt_conntrack nf_conntrack nf_defrag_ipv6 
Sep 14 16:57:15 mauni kernel: [ 5302.079116] nf_defrag_ipv4 libcrc32c sch_fq_codel ip6table_filter ip6_tables iptable_filter bpfilter parport_pc ppdev lp parport binder_linux ashmem_linux(CE) drm ip_tables x_tables autofs4 crc32_pclmul sdhci_pci cqhci psmouse sdhci i2c_i801 ahci libahci lpc_ich e1000e video wmi 
Sep 14 16:57:15 mauni kernel: [ 5302.079128] CPU: 1 PID: 1144 Comm: kworker/1:2 Tainted: G        WC  E     5.4.0-47-generic #51-Ubuntu 
Sep 14 16:57:15 mauni kernel: [ 5302.079129] Hardware name: LENOVO 2325AEG/2325AEG, BIOS G2ETB7WW (2.77 ) 09/24/2019 
Sep 14 16:57:15 mauni kernel: [ 5302.079144] Workqueue: events_freezable ieee80211_restart_work [mac80211] 
Sep 14 16:57:15 mauni kernel: [ 5302.079160] 
Sep 14 17:19:55 mauni PackageKit: resolve transaction /8143_eadacebb from uid 1000 finished with success after 474ms 
Sep 14 17:19:56 mauni snap-store[12756]: Only 2 apps for recent list, hiding 
Sep 14 17:19:57 mauni snap-store[12756]: Failed to find refreshable snaps: cannot list updates: Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: no such host 
Sep 14 17:19:57 mauni snap-store[12756]: automatically prevented from changing kind on system/package/*/generic/de.linrunner.tlp/* from generic to unknown! 
Sep 14 17:19:58 mauni PackageKit: resolve transaction /8144_becdcacd from uid 1000 finished with success after 500ms

相关内容