CyberBit

Python+MySQL

2018年12月1日

14. pt-kill

摘要: pt-kill h=192.168.100.101,P=3306,u=admin,p=admin \--match-user "user01" \--match-host "192.168.100.101" \--match-db "db01" \--match-command "Query" -- 阅读全文

posted @ 2018-12-01 09:18 CyberBit 阅读(153) 评论(0) 推荐(0) 编辑

13. pt-ioprofile

摘要: pt-ioprofile 直接运行即可,对系统有影响,慎用!!! read:从文件中读出数据。要读取的文件用文件描述符标识,数据读入一个事先定义好的缓冲区。 write:把缓冲区的数据写入文件中。 pread:由于lseek和read调用之间,内核可能会临时挂起进程,所以对同步问题造成了问题,调用p 阅读全文

posted @ 2018-12-01 09:17 CyberBit 阅读(145) 评论(0) 推荐(0) 编辑

12. pt-index-usage

摘要: pt-index-usage h=192.168.100.101,P=3306,u=admin,p=admin /data/mysql3306/data/slow.log 根据slow log来判断index,不太可靠,只能做参考。 阅读全文

posted @ 2018-12-01 09:14 CyberBit 阅读(165) 评论(0) 推荐(0) 编辑

11. pt-heartbeat

摘要: pt-heartbeat [OPTIONS] [DSN] --update|--monitor|--check|--stop 全部都在主库上做: pt-heartbeat --create-table --database db01 --daemonize h=192.168.100.101,P=3 阅读全文

posted @ 2018-12-01 09:11 CyberBit 阅读(132) 评论(0) 推荐(0) 编辑

10. pt-fk-error-logger

摘要: pt-fk-error-logger DSN 外键约束相关的,不关注。 阅读全文

posted @ 2018-12-01 08:52 CyberBit 阅读(157) 评论(0) 推荐(0) 编辑

09. pt-fingerprint

摘要: vim pt-fingerprint.txt select name, password from user where id=5;select name, password from user where id=6;select name, password from user where id= 阅读全文

posted @ 2018-12-01 08:48 CyberBit 阅读(364) 评论(0) 推荐(0) 编辑

08. pt-find

摘要: vim pt-find.cnf host=192.168.100.101port=3306user=adminpassword=admin pt-find --config pt-find.cnf db01 --tablesize +1k --noquote --printf "%D.%N %S % 阅读全文

posted @ 2018-12-01 08:46 CyberBit 阅读(138) 评论(0) 推荐(0) 编辑

07. pt-fifo-split

摘要: iostat -dxm 1 42 1>iostat.log 2>&1 #!/bin/bash offset=0lines=4fifo_file=/tmp/pt-fifo-splitdeal_file=/root/test/iostat.logresult_dir=/root/test/io_resu 阅读全文

posted @ 2018-12-01 08:45 CyberBit 阅读(204) 评论(0) 推荐(0) 编辑

06. pt-duplicate-key-checker

摘要: | t01 | CREATE TABLE `t01` ( `pkid` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `code` int(11) NOT NULL, `ctime` datetime D 阅读全文

posted @ 2018-12-01 08:44 CyberBit 阅读(225) 评论(0) 推荐(0) 编辑

05. pt-diskstats

摘要: pt-diskstats --devices-regex=sda --interval=1 --iterations=3 --show-timestamps #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_ 阅读全文

posted @ 2018-12-01 08:44 CyberBit 阅读(233) 评论(0) 推荐(0) 编辑

导航