Created
August 26, 2013 15:15
-
-
Save boris/6342565 to your computer and use it in GitHub Desktop.
This script will print all the queries executed by mysqld process. It should be run passing the PID of mysqld: dtrace -s watch_query.d -p `pgrep -x mysqld`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/sbin/dtrace -q | |
| pid$target::*mysql_parse*:entry | |
| { | |
| printf("Query: %s\n", copyinstr(arg1)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment