我们有一个Munin服务器,最近出现了一些非常奇怪的行为。网站本身运作得很好,我们得到了我们的统计数据,我被传呼了,否则一切都很好,除了.每隔5分钟我就会收到一封电子邮件,上面写着:
/bin/sh: 1: munin: not found
This program will easily break if you run it as root as you are
trying now. Please run it as user 'munin'. The correct 'su' command
on many systems is 'su - munin --shell=/bin/bash'
Aborting.因此,我认为crontab /etc/cron.d/munin-节点的用户名是错误的,对吗?不..。
#
# cron-jobs for munin-node
#
MAILTO=root
# If the APT plugin is enabled, update packages databases approx. once
# an hour (12 invokations an hour, 1 in 12 chance that the update will
# happen), but ensure that there will never be more than two hour (7200
# seconds) interval between updates..
*/5 * * * * munin if [ -x /etc/munin/plugins/apt_all ]; then munin-run apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then munin-run apt update 7200 12 >/dev/null; fi我甚至完全删除了文件/etc/cron.d/munin-节点,它仍然在继续运行,就好像它就在那里一样,并且它试图以root的形式运行。
当然,统计数据也会准时出现。如果我每5分钟收到一封垃圾邮件,我就快疯了。
发布于 2015-11-24 19:17:41
你查过根的crontab了吗?使用crontab -l作为根用户获取它的列表。如果做不到这一点,请到平常的地方看看。
/etc/crontab
/etc/cron.d
/etc/cron.*https://serverfault.com/questions/738699
复制相似问题