我如何停止并删除已损坏且填满我的系统日志文件的 KDE Baloo?

我如何停止并删除已损坏且填满我的系统日志文件的 KDE Baloo?

KDE baloo 最近开始rsyslog记录许多错误。

Syslog 的一部分

Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid

它导致我的/var/log/syslog磁盘呈指数级增长,它已经占满了磁盘一次,我已经禁用rsyslog它以防止它破坏我的 SSD 并使 Ubuntu 无法使用,但我不知道 Baloo 是什么或如何停止和卸载它。当我第一次注意到它/var/log/syslog已经增长到 66GB 时,导致我的磁盘已满。我能够删除它并重新登录并rsyslog通过恢复模式禁用它。运行rsyslog一秒钟导致它上升到75MB

'Neofetch --off' 结果

操作系统:Ubuntu 19.10 x86_64 
主持人:81NC 联想 IdeaPad S340-15API 
核心:5.3.0-40-通用 
正常运行时间:11 分钟 
套餐:3040(dpkg),38(快照) 
:bash 5.0.3 
解决:1920x1080 
:地精 
西医:咕哝 
窗口管理主题:阿德瓦伊塔 
主题:Yaru-黑暗 [GTK2/3] 
图标:雅鲁 [GTK2/3] 
终端:gnome 终端 
中央处理器:AMD Ryzen 5 3500U,配备 Radeon Vega Mobile Gfx (8) @ 2.100GHz 
图形处理器:AMD ATI 04:00.0 毕加索 
记忆:2756MB / 5945MB 

我不想立即卸载整个 KDE,但如果这是摆脱这个损坏程序的唯一方法,那么我很乐意这么做。

其他命令

harry@harry-S340:~$ whereis baloo
baloo:
harry@harry-S340:~$ sudo apt-get autoremove baloo
[sudo] password for harry: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'baloo' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
harry@harry-S340:~$ whereis baloo_file
baloo_file: /usr/bin/baloo_file
harry@harry-S340:~$ sudo apt-get autoremove baloo_file
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package baloo_file
harry@harry-S340:~$ sudo systemctl status baloo_file
Unit baloo_file.service could not be found.

按下 Tab 键查看所有包含 baloo 的命令:

harry@harry-S340:~$ baloo
balooctl                           baloo_filemetadata_temp_extractor
baloo_file                         baloosearch
baloo_file_extractor               balooshow

这些都没有任何手册

harry@harry-S340:~$ man baloo
No manual entry for baloo
harry@harry-S340:~$ man baloo_file
No manual entry for baloo_file
harry@harry-S340:~$ man balooctl
No manual entry for balooctl
harry@harry-S340:~$ man baloosearch
No manual entry for baloosearch
harry@harry-S340:~$ man balooshow
No manual entry for balooshow
harry@harry-S340:~$ man baloo_filemetadata_temp_extractor
No manual entry for baloo_filemetadata_temp_extractor
harry@harry-S340:~$ man baloo_file_extractor
No manual entry for baloo_file_extractor

提到的桌面文件syslog

[Desktop Entry]
Type=Application
Exec=baloo_file
X-KDE-StartupNotify=false
X-KDE-autostart-condition=baloofilerc:Basic Settings:Indexing-Enabled:true
X-KDE-autostart-phase=0
X-GNOME-Autostart-enabled=true
OnlyShowIn=KDE;GNOME;Unity;XFCE
NoDisplay=true

要求

Balooctl 状态

harry@harry-S340:~$ balooctl status
Baloo File Indexer is running
Indexer state: Indexing file content
Total files indexed: 109,311
Files waiting for content indexing: 3
Files failed to index: 4
Current size of index is 507.65 MiB
harry@harry-S340:~$ sudo balooctl disable
[sudo] password for harry: 
Disabling and stopping the File Indexer

这停止了rsyslog​​填充/var/log/syslog

谢谢,哈利

答案1

以下是我移除 baloo 的方法

balooctl disable                  # stops the service
sudo apt install -s baloo         # where to find baloo
sudo apt remove --purge libkf5balooengine5
rm -rf .local/share/baloo/        # removes the index files; they can be several GB

有一些相关的答案Baloo 创建了 64GB 索引,占用了一半的内存和 25% 的 CPU

答案2

对我来说,它只是帮助禁用内容索引,如下所示:

balooctl config set contentIndexing no

这样,baloo 应该可以快速为文件名创建索引,这样您仍然可以在 Dolphin 中搜索文件名。

答案3

我需要保留 baloo,这纠正了 syslog 调试问题,因此我成功运行了以下命令:

balooctl disable && balooctl purge && balooctl enable

检查状态balooctl status我得到:

Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 1,287
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 16.04 MiB

现在一切都很好,禁用、清除、重新启用服务会继续监控系统日志,以防万一

答案4

这删除了所有 baloo,但没有删除 dolphin、plasma 和 kde。我遇到了屏幕锁定,baloo_file 索引器占用了 112% 的 CPU——我重启时丢失了工作,因为我甚至无法进入终端窗口并杀死 baloo_file。我打算将其设为 cron 脚本,以防升级重新安装 baloo。你会认为维护者会将 baloo_file 重新设置为最低优先级!那可不是什么好事。我在 Ubuntu 20.10 桌面上。

balooctl disable 

for baloo in `dpkg --list 'baloo-kf5*' 'libkf5baloo5*' 'libkf5balooengine5*' 'libkf5baloowidgets-bin*' 'libkf5baloowidgets-data*' 'libkf5baloowidgets5*' | sed -n -E '/^ii/s/^ii[\t ]+([^\t :]+).*/\1/p'`
 do echo $baloo
 sudo snap remove $baloo
 sudo dpkg --ignore-depends=$baloo --purge $baloo
done

rm -rf .local/share/baloo/

sudo updatedb ; ls `locate baloo`

相关内容