linux – 防止apt-check吃掉我所有的记忆
在Ubuntu 12.04 LTS上,使用512MB RAM的服务器,apt-check使用多达250个内存,导致我的系统每晚都无法使用,例如:
ps ax | grep apt 14895 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14896 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14899 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14902 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14906 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14912 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14913 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14914 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14915 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14916 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14917 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 14920 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 15299 ? DN 0:01 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 15302 ? DN 0:02 /usr/bin/python /usr/lib/update-notifier/apt-check --human-readable 16368 pts/0 D+ 0:00 grep apt 这个脚本多次运行并吃掉我的系统资源到底是什么?这里有一个错误[1]已经确认,但没有任何解决方案.我有点惊讶这个bug很关键并存在于LTS中,叹息…… 无论如何,不??确定ubuntu团队何时能够修复,我们知道如何做到这一点? [1] https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/746508 解决方法
禁用update-notifier
如果要禁用update-notifier,可以按照this link中的说明进行操作. 来自链接的修改报价 >方法1 – 禁用一个用户 创建update-notifier.desktop的本地(用户)副本 mkdir -p ~/.config/autostart cp /etc/xdg/autostart/update-notifier.desktop ~/.config/autostart/ vim ~/.config/autostart/update-notifier.desktop 在本地文件中找到此行 X-GNOME-Autostart-Delay=60 用…来代替: X-GNOME-Autostart-enabled=false 现在注销并再次注销,或者终止正在运行的update-notifier: killall update-notifier >方法2 – 禁用所有用户 与方法1相同,但不是修改本地/用户副本,而是修改/etc/xdg/autostart/update-notifier.desktop 手动检查更新 禁用update-notifier后,使用Update Manager(GUI)或以下命令行检查包更新 sudo apt-get update sudo apt-get dist-upgrade 第一行从存储库下载最新的包列表.第二行将显示所有已安装的包,并提供更新. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |