上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 43 下一页
摘要: 生产环境中我们时常遇到这样的情况,数据库性能恶劣,需要马上杀掉部分会话,不然数据库就夯死。我们可以先找show processlist的输出来杀会话,但是比较麻烦。pt-kill为我们解决了杀会话问题。 1、每10秒检查一次,发现有 Query 的进程就给干掉# 只打印每10秒检查一次:(--int 阅读全文
posted @ 2020-02-25 23:32 __Yoon 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 1、查看当前应用连接,连接数突增排查 select user,SUBSTRING_INDEX(host,':',1) as ip , count(*) as count,db from information_schema.processlist where host not in ('localh 阅读全文
posted @ 2020-02-24 10:44 __Yoon 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Python <= 2.3python -c "import SimpleHTTPServer as s; s.test();" 8000 Python >= 2.4python -m SimpleHTTPServer 8000 Python 3.xpython -m http.server 800 阅读全文
posted @ 2020-02-18 14:32 __Yoon 阅读(1712) 评论(0) 推荐(0) 编辑
摘要: mysqld_exporter自带的这个功能,下面是我使用的启动参数: nohup ./mysqld_exporter --config.my-cnf="./my.cnf" --web.listen-address=":9104" --collect.heartbeat --collect.auto 阅读全文
posted @ 2020-01-20 18:01 __Yoon 阅读(321) 评论(0) 推荐(0) 编辑
摘要: Linux read 命令用于从标准输入读取数值。 read 内部命令被用来从标准输入读取单行数据。这个命令可以用来读取键盘输入,当使用重定向的时候,可以读取文件中的一行数据。 语法: read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [ 阅读全文
posted @ 2020-01-16 22:31 __Yoon 阅读(857) 评论(0) 推荐(0) 编辑
摘要: 1、查询语句本身其实是一个document, 最大为16MB(3.4,4.0 的限制,官方文档)2、查询语句本身,也就是{ '' : { '$in' : [] }}, 大小为 22字节3、每增加一个字段名,增加一位字节4、in里面每增加一个参数,大小固定增加11字节5、如下: mongos> Obj 阅读全文
posted @ 2020-01-16 11:02 __Yoon 阅读(2045) 评论(0) 推荐(0) 编辑
摘要: sysbench支持以下几种测试模式:1、CPU运算性能2、磁盘IO性能3、调度程序性能4、内存分配及传输速度5、POSIX线程性能6、数据库性能(OLTP基准测试) sysbench版本:[root@127-0-0-1 sysbench]# /u01/opt/sysbench/bin/sysben 阅读全文
posted @ 2020-01-06 16:05 __Yoon 阅读(593) 评论(0) 推荐(0) 编辑
摘要: Mysql时间加减函数为date_add()、date_sub()定义和用法DATE_ADD() 函数向日期添加指定的时间间隔。DATE_SUB() 函数向日期减少指定的时间间隔。语法DATE_ADD(date,INTERVAL expr type)DATE_SUB(date,INTERVAL ex 阅读全文
posted @ 2020-01-03 18:14 __Yoon 阅读(864) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash#this script used montor mysql network traffic.echo sqltcpdump -i bond0 -s 0 -l -w - dst port 3306 | strings | perl -e 'while(<>) { chomp; 阅读全文
posted @ 2020-01-03 17:05 __Yoon 阅读(304) 评论(0) 推荐(0) 编辑
摘要: tcpdump [-aAdDefhIJKlLnNOpqRStuUvxX] [ -B size ] [ -c count ] [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] [ -i interface ] [ -j tst 阅读全文
posted @ 2020-01-03 17:04 __Yoon 阅读(418) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 43 下一页