首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    工具分享丨分析GreatSQL Binglog神器

    事务控制事件涵盖了事务的起始时间、起始位置、结束时间和结束位置。通过这些详细信息,我们能够计算事务的大小,进而评估其是否属于大型事务,以及是否可能引起主从同步的延迟问题,及时发现大事务,可避免复制故障。 简介 本文分享的神器的名字就叫做binlog_summary,出自陈臣老师的手笔,也是开源的Python脚本文件,开源地址:https://github.com/slowtech/dba-toolkit/blob/master/mysql/binlog_summary.py 下载 运行此工具需要有Python环境,若没有python环境请自行下载 下载binlog_summary.py脚本,并授权 $ wget https://raw.githubusercontent.com/slowtech/dba-toolkit/master/mysql/binlog_summary.py $ chmod 755 binlog_summary.py 先用./binlog_summary.py -h查看下帮助 $ ./binlog_summary.py -h usage: binlog_summary.py [-h] [-f BINLOG_TEXT_FILE] [--new] [-c {tps,opr,transaction}] [--start START_DATETIME] [--stop STOP_DATETIME] [--sort SORT_CONDITION] [-e] [--limit LIMIT] options: -h, --help show this help message and exit -f BINLOG_TEXT_FILE, --file BINLOG_TEXT_FILE Binlog text file, not the Raw binary file --new Make a fresh start -c {tps,opr,transaction}, --command {tps,opr,transaction} Command type: [tps, opr, transaction],tps: transaction per second, opr: dml per table, transaction: show transaction info --start START_DATETIME Start datetime, for example: 2004-12-25 11:25:56 --stop STOP_DATETIME Stop datetime, for example: 2004-12-25 11:25:56 --sort SORT_CONDITION Sort condition: time or size, you can use it when command type is transaction -e, --extend Show transaction info in detail,you can use it when command type is transaction --limit LIMIT Limit the number of rows to display 其中参数介绍:

    01
    领券