云服务器配置类型:
ecs.t1.xsmall(1核,512MB内存)
OS:CentOS 6.3 64位
问题1:默认配置,还没有跑任何应用的情况下,在管理控制台下观察入网流量稳定在50Kbps左右,是否正常?这个跟/etc/rsyslog.conf中配置的将所有日志发送到官方日志服务器有关吗?(*.* @lids.aliyun.com)
问题2:默认有以下cron任务,为什么在/var/log目录下没有生成sa目录及sa日志文件?
cat /etc/cron.d/sysstat
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# 0 * * * * root /usr/lib64/sa/sa1 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A
问题3:maillog日志文件中每10分钟出现一条错误日志,该怎么排查原因?(cron日志文件中有记录,但在crontab调度任务中貌似没找到mail命令)
tail /var/log/maillog
Apr 3 23:50:01 AY1211101104422521140 postfix/sendmail[14143]: fatal: parameter inet_interfaces: no local interface found for ::1Apr 4 00:00:01 AY1211101104422521140 postfix/sendmail[14150]: fatal: parameter inet_interfaces: no local interface found for ::1
Apr 4 00:10:01 AY1211101104422521140 postfix/sendmail[14178]: fatal: parameter inet_interfaces: no local interface found for ::1...
tail /var/log/cron
Apr 4 00:10:01 AY1211101104422521140 CROND[14177]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 4 00:10:01 AY1211101104422521140 CROND[14176]: (root) MAIL (mailed 56 bytes of output but got status 0x004b#012)
...
[/var/log/maillog]
Apr 4 13:50:01 AY1211101104422521140 postfix/sendmail[14822]: fatal: parameter inet_interfaces: no local interface found for ::1
Apr 4 14:00:01 AY1211101104422521140 postfix/sendmail[14848]: fatal: parameter inet_interfaces: no local interface found for ::1
[/var/log/cron]
Apr 4 13:50:01 AY1211101104422521140 CROND[14821]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 4 13:50:01 AY1211101104422521140 CROND[14820]: (root) MAIL (mailed 56 bytes of output but got status 0x004b#012)
Apr 4 14:00:01 AY1211101104422521140 CROND[14847]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Apr 4 14:00:01 AY1211101104422521140 CROND[14846]: (root) MAIL (mailed 56 bytes of output but got status 0x004b#012)
关于maillog、cron日志每10分钟报错的问题,在
mrznz的启发下,确定跟IPv6有关,后来编辑/etc/hosts文件,把::1条目注释掉后就“解决了”:
127.0.0.1 localhost
#::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 //就是这一行
10.200.116.26 AY1211101104422521140
但是,maillog开始报新的警告级别信息(依旧是每10分钟报一次):
Apr 4 14:10:01 AY1211101104422521140 postfix/postdrop[14885]: warning: unable to look up public/pickup: No such file or directory
Apr 4 14:20:01 AY1211101104422521140 postfix/postdrop[14899]: warning: unable to look up public/pickup: No such file or directory
继续google一圈后,终于发现是由于postfix服务默认没有启动,于是service postfix start、chkconfig --level 3 postfix on:
chkconfig --list postfix
postfix 0:off 1:off 2:off 3:on 4:off 5:off 6:off
好了,maillog日志终于不再报“
warning: unable to look up public/pickup: No such file or directory”了,取而代之的是每10分钟收到一封新邮件,内容是:
-------------------------
-------------------------
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。