I have written about Maatkit in the past, and more specifically how to use ‘mk-query-digest’.  Development on Maatkit has stopped at this point and you should look to use the Percona Toolkit for Mysql going forward.
We use ‘pt-query-digest’ on a regular basis on our servers in order to profile running Mysql instances during periods of high load and at times when general query profiling is required. Â It appears as though there have been some changes to way in which the script works during the transition from ‘mk-query-digest’ to ‘pt-query-profiler’
In order to use it at this point you should use the following example syntax:
You will also notice that there is a new command line paramater ‘–run-time’ that is used to determine how long you would like the profiler to run before producing a report, in this case I would like to run the profiler for 10 minutes.
The output is also slightly different in that the summery report that was normally printed out at the end of the report has been moved toward the beginning of the report as well.