Skip to content

Instantly share code, notes, and snippets.

@foozlevazquez
Created December 8, 2015 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foozlevazquez/0bdf6e912cac7b65e10c to your computer and use it in GitHub Desktop.
Save foozlevazquez/0bdf6e912cac7b65e10c to your computer and use it in GitHub Desktop.
Capture tcp digest mysql
#!/bin/bash
set -e
TMPF=/tmp/mysql_tcpdump.$$
tcpdump -s 65535 -x -nn -q -tttt -i any -c 50000 port 3306 > ${TMPF}
pt-query-digest --type tcpdump ${TMPF}
rm ${TMPF}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment