介绍:
一款帮助语句分析、过滤、分析和排序MySQL慢日志、查询日志、二进制日志和microslow patched日志的分析工具。整体来说, 功能非常强大. 数据报表,非常有利于分析慢查询的原因, 包括执行频率, 数据量, 查询消耗等。
安装:
[root@node01 mysqlsla]# tar -xzvf mysqlsla-2.03.tar.gz
mysqlsla-2.03/
mysqlsla-2.03/Changes
mysqlsla-2.03/INSTALL
mysqlsla-2.03/README
mysqlsla-2.03/Makefile.PL
mysqlsla-2.03/bin/
mysqlsla-2.03/bin/mysqlsla
mysqlsla-2.03/META.yml
mysqlsla-2.03/lib/
mysqlsla-2.03/lib/mysqlsla.pm
mysqlsla-2.03/MANIFEST
[root@node01 tools]# cd mysqlsla-2.03/
[root@node01 mysqlsla-2.03]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for mysqlsla
[root@node01 mysqlsla-2.03]# make
cp lib/mysqlsla.pm blib/lib/mysqlsla.pm
cp bin/mysqlsla blib/script/mysqlsla
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/mysqlsla
Manifying blib/man3/mysqlsla.3pm
[root@node01 mysqlsla-2.03]# make install
Installing /usr/lib/perl5/site_perl/5.8.8/mysqlsla.pm
Installing /usr/share/man/man3/mysqlsla.3pm
Installing /usr/bin/mysqlsla
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/mysqlsla/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
注:
需要Perl
及perl-DBI-1.52-.....rpm
安装完毕。
使用:
#mysqlsla LOG
(2.03自动判断日志类型做日志分析)
详细使用方法:
# Basic operation: parse a MySQL slow or general log
mysqlsla --log-type slow LOG
mysqlsla --log-type general LOG
# Parse output from mysqlbinlog
# mysqlsla cannot directly parse binary logs
mysqlbinlog LOG │ mysqlsla --log-type binary -
# Parse a microslow patched slow log
mysqlsla --log-type msl LOG
# Replay a replay file
mysqlsla --replay FILE
# Parse a user-defined log specify its format
mysqlsla --log-type udl --udl-format FILE
# Let mysqlsla automatically determine the log type
mysqlsla LOG
报表:
[root@node01 testing]# mysqlsla SRVR00-slow.log
Auto-detected logs as slow logs
Report for slow logs: SRVR00-slow.log
1.65k queries total, 10 unique
Sorted by 't_sum'
Grand Totals: Time 36.20k s, Lock 0 s, Rows sent 41.59M, Rows Examined 2.70G
______________________________________________________________________ 001 ___
Count
: 1.62k
(98.25%)
Time
: 34947 s total, 21.519089 s avg, 16 s to 42 s max
(96.54%)
95% of Time : 32271 s total, 20.928016 s avg, 16 s to 29 s max
Lock Time (s) : 0 total, 0 avg, 0 to 0 max
(0.00%)
95% of Lock : 0 total, 0 avg, 0 to 0 max
Rows sent
: 4 avg, 4 to 4 max
(0.02%)
Rows examined : 1.64M avg, 1.07M to 2.13M max
(98.32%)
Database
: teachingfile
Users
:
详情请点击:http://www.yuandingsoft.com/resource/Mysql/2012-10-24/2691.html
mysqlsla工具安装与介绍
精选 转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
selenium工具介绍与安装
Selenium是一个Web的自动化测试工具,最初是为网站自动化测试而开发的,类型像我们玩游戏用的按键精灵,可以按指定的命令自动操作
selenium 测试工具 Selenium python 环境变量 -
mysqlsla
http://hackmysql.com/mysqlsla 一个很好mysql日志分析软件. 尝试了下.确实不错.
软件 职场 mysql 数据库 休闲 -
MySQL慢日志分析工具mysqlsla
MySQL慢日志分析工具mysqlsla
MySQL慢日志分析工具mysqlsla -
Prometheus 监控工具详细介绍与安装
Prometheus 监控工具介绍Prometheus是一个最初在SoundCloud上构建的开源系统
普罗米修斯 数据 时间序列 配置文件