解决rsyslog 断电或者被kill 重发问题
$InputFilePersistStateInterval 1 Specifies how often the state file shall be written when processing the input file. The default value is 0, which means a new state file is only written when the monitored files is being closed (end of rsyslogd execution). Any other value n means that the state file is written every time n file lines have been processed. This setting can be used to guard against message duplication due to fatal errors (like power fail). Note that this setting affects imfile performance, especially when set to a low value. Frequently writing the state file is very time consuming. 应用发送端:
uat-web02:/var/log/nginx# cat scan.log
dadadatest
uat-web02:/var/log/nginx# echo "dadadatest" >>scan.log
You have new mail in /var/spool/mail/root
uat-web02:/var/log/nginx# echo "1111111111111" >>scan.log
uat-web02:/var/log/nginx# echo "2222222222222" >>scan.log
uat-web02:/var/log/nginx# ps -ef | grep rsyslog
root 23550 1 0 14:50 ? 00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid
root 23576 22786 0 14:50 pts/1 00:00:00 grep rsyslog
uat-web02:/var/log/nginx# kill -9 23550
uat-web02:/var/log/nginx# ps -ef | grep rsyslog
root 23578 22786 0 14:50 pts/1 00:00:00 grep rsyslog
uat-web02:/var/log/nginx# service rsyslog start
Starting system logger: [ OK ]
uat-web02:/var/log/nginx# cat scan.log
dadadatest
dadadatest
1111111111111
2222222222222
You have new mail in /var/spool/mail/root rsyslog 接收端:
zjtest7-frontend:/data/scan# cat scan.2016-10-10
dadadatest
1111111111111
2222222222222
zjtest7-frontend:/data/scan# cat scan.2016-10-10
dadadatest
1111111111111
2222222222222
dadadatest
dadadatest
1111111111111
2222222222222 看到当kill后,会重发 解决:
input(type="imfile"
File="/var/log/nginx/scan.log"
Tag="uat-scan"
Severity="info"
PersistStateInterval="1"
Facility="local5")
解决rsyslog 断电或者被kill 重发问题的更多相关文章
- 解决服务器断电导致mysql数据库无法启动
1.找到mysql数据库目录下的*.ini这个配置文件2.复制配置文件到桌面,当作备份3.打开配置文件,在配置文件里加上innodb_force_recovery=6这句,保存,然后重启服务器4重启完 ...
- 解决异常断电导致的: CorruptSSTableException: java.io.EOFException
问题产生 服务器重启,导致cassandra损坏,整个集群不可用.所使用的cassandra为2.1.9版本. 问题描述 运行启动命令,报错如下: DEBUG :: All segments have ...
- linux服务之rsyslog
日志片断分析 systemd:服务报出来的信息kvm:内核模块kvm报出来的信息kernel: tun: 内核的tun模块报出来的信息kernel: br0: 内核的br0模块报出来的信息kernel ...
- 解决adb.exe' and can be executed.
百度google大家多说的是任务管理器 kill掉adb 或者重启adb server,但我任务管理器就没有adb ,猜测是某个程序占用了adb端口.于是按此思路查找. 5037为adb默认端口 查看 ...
- 解决Please ensure that adb is correctly located at 'D:\java\sdk\platform-tools\adb.exe' and can be executed.
遇到问题描述: 运行android程序控制台输出 [2012-07-18 16:18:26 - ] The connection to adb is down, and a severe error ...
- Library cache lock 故障解决一例
今天收到同事电话,说是数据库中一张名为acct_balance进行操作是奇慢,第一反映是不是扫行计划有问题,结果我错了,现将过程记录下来. 用pl/sql连上数据库情况:1.对acct_balance ...
- MySQL is running but PID file could not be found(解决方法)
启动MySQL时报错: [root@xzw /]# service mysqld status MySQL is running but PID file could not be found ...
- 数据库too many connections 解决方法
问题:网站后台突然报错了,显示“too many connections........”这是咋回事? 解决: 先罗列几个有用的操作: ① mysql -u root -p 回车输入密码进入mysq ...
- Redis初步认识
官网:redis.io Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的 ...
随机推荐
- Thrift初探:简单实现C#通讯服务程序
Thrift是一种可伸缩的跨语言服务框架,它结合了功能强大的软件堆栈的代码生成引擎,以建设服务,工作效率和无缝地与C++,C#,Java,Python和PHP和Ruby结合.thrift允许你定义一个 ...
- struts2的配置和使用
一:配置stuts2的运行环境,把以下的包放到WEB-INF/lib目录下 1,structs2-core-2.1.6.jar struts的核心库 2,xwork-2.1.2.jar ...
- 微信公众账号【iOSDevTip】推出新栏目【看大牛】
首先你须要关注微信公众账号[iOSDevTip] 基于微信公众平台数据分析.非常easy发现.移动端project师都喜欢关注互联网创业资讯.都说.一个不关注互联网创业的iOS开发不是一个合格的互联网 ...
- android 支持的语言列表(汇总)
Arabic, Egypt (ar_EG) -----------------------------阿拉伯语,埃及Arabic, Israel (ar_IL) ------------------- ...
- struts2,hibernate,spring整合笔记(2)
上一话struts2,hibernate,spring整合笔记(1) 接下来继续 配置完struts之后就要开始hibernate的配置 hibernate的环境并不依赖web开发环境,在我第一次配置 ...
- HTML基础总结<段落>
HTML 段落 段落是通过 <p> 标签定义的. 实例 <p>This is a paragraph </p><p>This is another pa ...
- (转)SVN教程总结
文章原地址:http://www.cnblogs.com/armyfai/p/3985660.html SVN简介: 为什么要使用SVN? 程序员在编写程序的过程中,每个程序员都会生成很多不同的版本, ...
- (转)js arguments对象
在javascript中,不需要明确指出参数名,就能访问它们.如: function hi(){if(arguments[0]=="andy"){ return;}aler ...
- solr集群solrCloud的搭建
上一章讲了solr单机版的搭建,本章将讲解sole集群的搭建.solr集群的搭建需要使用到zookeeper,搭建参见zookeeper集群的安装 一.solr实例的搭建 1. tomcat安装 这里 ...
- JNDI Tutorial
Naming Concepts A fundamental facility in any computing system is the naming service--the means by w ...