Helper script for pt-query-digest from the Percona Toolkit
You need to have tcpdump and Percona Toolkit installed. You can choose how long tcpdump should run, and with what filters.
I really should just make a patch for pt-query-digest to add a report in the format I prefer, but I'm not as proficient with Perl as I'd like to be.