Linux问题:last message repeated N times

作者:老王

偶然发现系统日志/var/log/messages里出现大量错误信息:

Jun 8 13:20:49 SERVER snmpd[14281]: Connection from UDP: [192.168.0.178]:9632
Jun 8 13:25:07 SERVER last message repeated 7 times
Jun 8 13:30:49 SERVER last message repeated 8 times


先来想办法重现一下这个问题,在shell里使用logger命令:

logger "foo"
logger "foo"
logger "foo"
logger "bar"


logger命令会向/var/log/messages日志里写入相应的信息,可以用tail -f /var/log/messages查看:

Jun 8 21:23:32 SERVER root: foo
Jun 8 21:23:34 SERVER last message repeated 2 times
Jun 8 21:23:37 SERVER root: bar


大致了解了last message repeated N times信息产生的原因。至于它的作用,无非是为了屏蔽不必要的重复信息,感觉用处不大,看着还闹心。真实的重复信息也就是last message repeated N times上面的信息,如此一来,回到文章开头,就能猜到本文中出现大量last message repeated N times的原因在于有一个IP不断的连接snmpd服务,且中间没有插入其他日志信息。

查看一下snmpd的启动脚本/etc/init.d/snmpd,会发现里面有如下参数设置:

OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"

通过man snmpd和man snmpcmd查到-Lsd参数的作用就是向syslog里系日志,没什么大用,直接去掉:

OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -a"

修改后别忘了重启一下服务:/etc/init.d/snmpd restart,唐僧不再唠叨,世界终于清净了。

[h264 @ 000001ef94ed8280] Format h264 detected only with low score of 1, misdetection possible! [h264 @ 000001ef94ed9f40] illegal POC type 5 [h264 @ 000001ef94ed9f40] non-existing PPS 10 referenced [AVBSFContext @ 000001ef94ee0280] Invalid NAL unit 0, skipping. Last message repeated 6 times [h264 @ 000001ef94ed9f40] Invalid NAL unit 0, skipping. Last message repeated 6 times [h264 @ 000001ef94ed9f40] slice type 32 too large at 25 [h264 @ 000001ef94ed9f40] decode_slice_header error [h264 @ 000001ef94ed9f40] no frame! [h264 @ 000001ef94ed9f40] non-existing PPS 0 referenced [AVBSFContext @ 000001ef94ee0280] Invalid NAL unit 16, skipping. Last message repeated 3 times [h264 @ 000001ef94ed9f40] Invalid NAL unit 16, skipping. Last message repeated 3 times [h264 @ 000001ef94ed9f40] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [h264 @ 000001ef94ed9f40] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [h264 @ 000001ef94ed9f40] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [h264 @ 000001ef94ed9f40] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [h264 @ 000001ef94ed9f40] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. [h264 @ 000001ef94ed9f40] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org) [h264 @ 000001ef94ed9f40] no frame! [h264 @ 000001ef94ed8280] Stream #0: not enough frames to estimate rate; consider increasing probesize [h264 @ 000001ef94ed8280] decoding for stream 0 failed [h264 @ 000001ef94ed8280] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, h264, from 'C:\Users\26742\Desktop\1.264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc At least one output file must be specified
07-15
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值