Often I run into problems when trying to use mk-query-digest with tcpdump on “very” busy hosts. You might be thinking, “very busy… $RESfile; exit’ INT TERM EXIT # digest the result, copy to localhost, then email it ssh $REMOTEHOST — “mk-query-digest –type tcpdump –limit $LIMIT < $TMP/$TMPfile…
Post: Gathering queries from a server with Maatkit and tcpdump
… ready to analyze it. Let’s see: mk-query-digest –type=tcpdump –report-format=profile tcpdump.out # Rank Query ID Response time Calls R/Call Item… suppose that one query was that took a tenth of a second? We can find out. mk-query-digest –type=tcpdump –limit 1 tcpdump.out # 460ms…
Post: Logging MySQL queries from the client instead of the server
… as the slow-query-log format, so you can analyze it easily with tools such as Maatkit’s mk-query-digest. These tools can… and completeness; you can use tcpdump and some quick shell commands, for example. But with mk-query-digest‘s built-in ability to decode… needs. Just use tcpdump and the “–type=tcpdump” option to mk-query-digest. You can even make it print out a “slow query log file” format…
Post: Maatkit Now Supports Memcached
… with mk-query-digest Ponder the results, or consider a different –report option In code: wget http://maatkit.googlecode.com/svn/trunk/mk-query-digest/mk-query-digest sudo tcpdump -s 65535 -x -n -q -tttt -i eth0 port 11211 > memc_tcpdump.txt mk-query-digest –type memcached memc_tcpdump.txt Depending…
Post: How to debug long-running transactions in MySQL
…/tcpdumps/`date +%s`-innodbstatus pid=$! sleep 30 kill ${pid} fi If this captures anything, then you can simply run “mk-query-digest –type=tcpdump –no-report –print” on the resulting tcpdump file (after inspecting the captured SHOW INNODB…
Comment: How to use tcpdump on very busy hosts
…/bin/mk-query-digest –type=tcpdump : 100000 packets captured 195794 packets received by filter 95664 packets dropped by kernel And now using /usr/sbin/tcpdump…] & 7 == 2′; /usr/sbin/tcpdump -r /tmp/snoopfile -s0 -x -nn -q -tttt | /usr/bin/mk-query-digest –type=tcpdump : 100000 packets captured 100286 packets…
Comment: Maatkit Now Supports Memcached
I have root@lb2:~# ./mk-query-digest –type memcached memc_tcpdump.txt # mk_query_digest:6381 6920 Use of uninitialized value in string eq at ./mk-query-digest line 5363, chunk 1. # # mk_query_digest:6381 6920 Use of uninitialized value in string eq at ./mk-query-digest line 5363, chunk 2. #
Comment: Maatkit Now Supports Memcached
… in the comments: mk_query_digest:6758 23474 Use of uninitialized value $source in pattern match (m//) at /usr/bin/mk-query-digest line 2045, chunk… with it. The tcpdump command options: tcpdump -s 65535 -v -x -n -q -tttt -i any port 11211 > memc_tcpdump.txt Any suggestions…
Comment: Maatkit Now Supports Memcached
I also get errors: # mk_query_digest:6758 29461 Use of uninitialized value in pattern match (m//) at mk-query-digest line 2045, chunk 2972. Here’s how I captured tcpdump: tcpdump -s 65535 -v -x -n -q -tttt -i any port 11211 > memc_tcpdump.txt
Comment: Maatkit Now Supports Memcached
When I try to use it, it just gives lots of these lines: ./mk-query-digest –type memcached memc_tcpdump.txt # mk_query_digest:6758 5136 tell() on closed filehandle at ./mk-query-digest line 2019.

