Mysql - logfile analysing: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
Sample output for a general log analysis: |
Sample output for a general log analysis: |
||
<pre> |
<pre> |
||
pt-query-digest --type=genlog mysql-general.log |
pt-query-digest --type=genlog --filter '$event->{db} eq "wp-site42"' mysql-general.log |
||
</pre> |
</pre> |
||
=== mysqlsla === |
=== mysqlsla === |
||
<pre> |
<pre> |
||
./mysqlsla - |
./mysqlsla --log-type general mysql-general.log |
||
</pre> |
</pre> |
Latest revision as of 11:39, 13 March 2014
Mysql logfile analysis
General log
This will focus on general log analysing.
Will be using two fantastic tools:
- pt-query-digest (on debian/ubuntu part of the percona-toolkit package)
- mysqlsla (must be downloaded: http://hackmysql.com/mysqlsla)
pt-query-digest
Sample output for a general log analysis:
pt-query-digest --type=genlog --filter '$event->{db} eq "wp-site42"' mysql-general.log
mysqlsla
./mysqlsla --log-type general mysql-general.log