binary log,是mysql中一个非常重要的部分,其主要作用有两个:
- Replication:在master端开启binary log后,binary log记录所有数据库的改动,然后slave端获得这个binary log文件内容,就可以在slave端进行同样的操作,使master和sla[......]
中午正准备去吃饭,收到大量报警,10.xx.xx.xx- MySQL Replication [slave_lag] is still below threshold of 0 with -1
麻烦了,复制中断了,赶紧回办公室,连上服务器
show slave status
显示
*********[......]
1 \s命令显示的
Threads: 3 Questions: 137227384 Slow queries: 878668 Opens: 1922 Flush tables: 12 Open tables: 192 Queries per second avg: 21.710
中的Qu[......]
因为打开了 log-queries-not-using-indexes选项,所以有一些信息需要过滤掉,如晚上backupuser备份的时候的一些查询语句,也可以根据时间,超过XXX毫秒的才发邮件:
perl -MCPAN -e shell
install Mail::Mailer
—[......]
perl -MCPAN -e shell
cpan[1]> install Mail::Mailer
——————
#!/usr/bin/perl
# MySQL错误日志监控角本
# author: chengjiangd[......]
cacti mysql-cacti-templates添加新的监控项目
虽然mysql-cacti-templates模版的四十个项目已经包含绝大多数的重要指标,但不可否则,用户仍然可能有添加自定义指标的需求。
比如最近发现经常出现Can’t create more than max_p[......]
wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.613.tar.gz
tar zxvf DBI-1.613.tar.gz
cd DBI-1.613
perl Makefile.PL
make
make test
make ins[......]
/usr/local/coreseek/bin/search -c /usr/local/coreseek/etc/csft.conf 美国意大利
查询结果是正确的,但是content内容显示是乱码
csft.conf里面加了sql_query_pre = SET [......]
yum install gcc gcc-c++ libtool autoconf automake imake
wget http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.13.tar.gz
tar xzvf coreseek-3.2.13.t[......]
今天接到电话有一个服务挂掉了,立即上DB查看发现 cpu load 12以上,show processlist 在400左右,多半在 sending data 状态,用 tail -f slow.log,发现超时语句非常多,很多上百秒了。
问了运维,原来cpu都还没有加报警,那我就先从数据库内部数据[......]
踩踩