`
lxneng
  • 浏览: 188363 次
  • 性别: Icon_minigender_1
  • 来自: 火星
社区版块
存档分类
最新评论

MySQL 优化工具 mtop

阅读更多
最近在做mysql优化,发现mtop比较简单好用,可以实时的监控MySQL

安装
    perl Makefile.PL
    make
    make install


使用:
mtop -dbu mysql_username -p mysql_password -se 1


对慢语句使用了紫,黄,红颜色高亮,使用起来非常简单方便。

OPTIONS

All options can be abbreviated by their shortest unique abbreviation.

-?, --help
    Show the help screen and exit.

-v, --version
    Show the version number and exit.

-h {mysql_host}, --host={mysql_host}
    By default, the mysqld on localhost is monitored. Specify an alternate host with this option.

-dbu {mysql_user}, --dbuser={mysql_user}
    By default, the user 'mysqltop' is used to connect to the database. Specify an alternate user with this option.

-p {mysqluser_pw}, --password={mysqluser_pw}
    By default, there is no password associated with the mysqltop user, specify a password with this option.

-se {refresh}, --seconds={refresh}
    The default screen refresh is 5 seconds.

-sl {seconds}, --slow={seconds}
    The number of seconds before a slow query is highlighted. The default is the server's long_query configuration variable.

-vs {seconds}, --veryslow={seconds}
    The number of seconds before a very slow query is highlighted. The default is the the --slow option * 2.

-vvs {seconds}, --veryveryslow={seconds}
    The number of seconds before a very very slow query is highlighted. The default is the the --slow option * 4.

-i, --[no]idle
    By default, processes in the Sleep command state are not shown. This option turns on display of idle threads.

-u {user}, --user={user}
    Show only threads owned by this user.

-fu {regex_pattern}, --filter-user={regex_pattern}
-fh {regex_pattern}, --filter-host={regex_pattern}
-fd {regex_pattern}, --filter-db={regex_pattern}
-fs {regex_pattern}, --filter-state={regex_pattern}
-fc {regex_pattern}, --filter-command={regex_pattern}
-fi {regex_pattern}, --filter-info={regex_pattern}
    Filter the display based on the regex_pattern provided. The regex_pattern is a perl regular expression. The regular expression match is done with case insensitivity.

    For example, to only show select statements on the user table, use the following:

        --filter-info='select from user'

    or, to be more forgiving for mutil-table joins and extra spaces, use:

        --filter-info='select\s+from\s+.*\buser\b.*where'

    These same regular expression filters can be used with the interactive d command. Be careful to escape any special shell characters in the regex.

-m, --manualrefresh
    In this mode, the screen only refreshes when the user hits a key on the keyboard. The screen will refresh automatically until a query is seen and then wait for further input. An uppercase M will appear in the top right hand corner of the screen to indicate that you are in this mode.

All options can be stored in initialization files. Command line options override options stored in the initialization file(s). The following files are checked for arguments: current direcotry .mtoprc, home directory .mtoprc, /usr/local/etc/mtoprc, /etc/mtoprc. Options in the former files override options in the later files.

The format of the initialization file is one option per line. Options are specified just as they would be on the command line. They can be abbreviated and use the one or two hyphen syntax. Comments and blank lines are ignored. The following is an exmple .mtoprc file which sets a user filter to user1 and sets the refresh rate to one second:

    #  Only look at 'user1'
    -fu user1
    --seconds=1   # refresh every one seconds

0
0
分享到:
评论

相关推荐

    Mysql-mtop性能监控

    Mysql-mtop性能监控,mysql性能监控工具使用说明

    MySQL MTOP v2.1.zip

    MySQL MTOP是一个由Python PHP开发的开源MySQL企业监控系统。系统由Python实现多进程数据采集和告警,PHP实现WEB展示和管理。MySQL服务器无需安装任何Agent,只需在监控WEB界面配置相关数据库信息,启动监控进程后,...

    MySQL MTOP是一个由Python+PHP开发的开源MySQL数据库监控系统

    MySQL MTOP是一个由Python+PHP开发的开源MySQL数据库监控系统。系统由Python实现多进程数据采集和告警,PHP实现WEB展示和管理。MySQL服务器无需安装任何Agent,只需在监控WEB界面配置相关数据库信息,启动监控进程后...

    MySQL MTOP数据管理最新官方版

    MySQL MTOP数据管理最新官方版,MySQL MTOP是一个由Python+PHP开发的开源MySQL企业监控系统。系统由Python实现多进程数据采集和告警,PHP实现WEB展示和管理。MySQL服务器无需安装任何Agent,只需在监控WEB界面配置...

    Python-mtop用于MongoDB类似于top工具

    mtop - 用于MongoDB类似于top工具

    MySQL MTOP v2.1

    MySQL MTOP是一个由Python+PHP开发的开源MySQL企业监控系统。系统由Python实现多进程数据采集和告警,PHP实现WEB展示和管理。MySQL服务器无需安装任何Agent,只需在监控WEB界面配置相关数据库信息,启动监控进程后,...

    mtop第三方用用介入指南

    mtop第三方用用介入指南

    MySQL企业监控系统

    MySQL MTOP是一个由Python+PHP开发的开源MySQL企业监控系统。系统由Python实现多进程数据采集和告警,PHP实现WEB展示和管理。MySQL服务器无需安装任何Agent,只需在监控WEB界面配置相关数据库信息,启动监控进程后,...

    mtop-MySQL terminal based query monitor-开源

    mtop(MySQL的顶部)监视一个MySQL数据库,该数据库显示查询花费的时间最多。 功能包括“放大”流程以显示完整的查询和“解释”查询优化器信息。

    mysql innodb的监控(系统层,数据库层)

    也可以用一些现成的监控工具进行查询,目前用的比较多的innotop、mysqlreport、mtop、mytop,还有淘宝perl语言研发的orzdba。 就监控的指标而言,有系统层面的,数据库层面的。 1、系统层面包括系统的load、cpu、...

    MainMtop.java

    喵街xposed抓包hook //[option]关闭MTOP请求长链,调用后Mtop请求直接调用NetworkSDK的HttpNetwork发请求 SwitchConfig.getInstance().setGlobalSpdySwitchOpen(false);

    RDS.MTOP:MTOP 的 RDS 版本代码

    RDS.MTOP 用于 MTOP 测试的 RDS 版本代码

    MySQLMTOP数据库监控系统-其他

    2、实时MySQL状态监视和警报MySQL MTOP持续监视MySQL的基本状态和性能信息,包括数据库连接状态,启动时间,数据库版本,总连接数,活动进程,QPS,TPS,进出MySQL数据库的流量信息。在数据库状态异常或偏离正常基准...

    战舰MtoP+PtoM.rar

    根据战舰资料修改的DMA到串口与串口到DMA的程序

    MtopHTMLPasswordLock(网站密码加密工具)5.4破解安装版

    MTop HTML Password Lock HTML 破解版是简单来说就是一个针对单个网页或者整个网站的密码加密工具,用户访问时需要输入口令授权密码才能看到网页或者网站的内容!使用起来不需要学习复杂的Perl等语言,不需要学习...

    innotop使用说明

    innotop安装及使用说明.......................

    taobao_api:调用淘宝api秒杀抢购

    mtop.trade.query.bag/5.0/? 订单确认页 mtop.trade.order.build.h5/4.0/? 创建订单页 mtop.trade.order.create.h5/4.0/? ├── taobao.py #第一版,通过selenium扫码下单,兼容性强。 ├── taobao_web.py #第二...

    javasmack源码-ops_skill_summary:您必须熟练掌握的devops工具或脚本

    java smack源码 ops_skill_summary Bootstrapping kickstart cobbler rpmbuild/xen kvm lxc openstack cloudstack ...自动配置管理工具 ...mtop ...网络性能工具 ...TCP优化监控工具 简介: 响应时间统计工具

    基于java的大麦网演唱会抢门票工具

    基于java的大麦网演唱会抢门票工具

    调用淘宝API接口,获取商品类目

    这只是一个调用淘宝API接口的小例子,简单的获取到淘宝商品类目,并绑定到DataGridView

Global site tag (gtag.js) - Google Analytics