首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Binlog分析工具-binlog_analysis

Binlog分析工具-binlog_analysis

原创
作者头像
贺春旸的技术博客
发布2023-09-26 10:16:49
发布2023-09-26 10:16:49
5760
举报
文章被收录于专栏:DBA 平台和工具DBA 平台和工具

Binlog分析工具-binlog_analysis

shell> chmod 755 binlog_analysis

用途:高峰期排查哪些表TPS比较高

代码语言:javascript
复制
usage: binlog_analysis [-h] -H <host> [-P <port>] -u <user> -p <password> -d <database> [-c <charset>] -s <start_index> [-e <end_index>]

Binlog Analysis Tool

options:
  -h, --help            show this help message and exit
  -H <host>, --host <host>
                        the MySQL server host (default: 127.0.0.1)
  -P <port>, --port <port>
                        the MySQL server port (default: 3306)
  -u <user>, --user <user>
                        the MySQL user name
  -p <password>, --password <password>
                        the MySQL password
  -d <database>, --database <database>
                        the database schema name
  -c <charset>, --charset <charset>
                        the MySQL connection character set (default: utf8)
  -s <start_index>, --start <start_index>
                        the start index of binlog files, e.g. mysql-bin.000001
  -e <end_index>, --end <end_index>
                        the end index of binlog files, e.g. mysql-bin.000003

shell> ./binlog_analysis -H 192.168.188.197 -u admin -p '123456' -d test -s mysql-bin.049622 -e mysql-bin.049628

shell> ./binlog_analysis -H 192.168.188.197 -u admin -p '123456' -d test -s mysql-bin.049622

输出结果:

代码语言:javascript
复制
new_qrtz_schedule_job: {'insert': 0, 'update': 82652, 'delete': 0}

withdraw_close_send: {'insert': 185, 'update': 456, 'delete': 0}

api_channel_check_record: {'insert': 306, 'update': 0, 'delete': 0}

user_contract: {'insert': 140, 'update': 140, 'delete': 0}

user_limit_change_log: {'insert': 96, 'update': 96, 'delete': 0}

user_limit_record_log: {'insert': 187, 'update': 0, 'delete': 0}

user_coupon_task: {'insert': 0, 'update': 123, 'delete': 0}
注:工具适用于Centos7 系统。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Binlog分析工具-binlog_analysis
    • 用途:高峰期排查哪些表TPS比较高
相关产品与服务
云数据库 MySQL
腾讯云数据库 MySQL(TencentDB for MySQL)为用户提供安全可靠,性能卓越、易于维护的企业级云数据库服务。其具备6大企业级特性,包括企业级定制内核、企业级高可用、企业级高可靠、企业级安全、企业级扩展以及企业级智能运维。通过使用腾讯云数据库 MySQL,可实现分钟级别的数据库部署、弹性扩展以及全自动化的运维管理,不仅经济实惠,而且稳定可靠,易于运维。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档