3 ms·
Using DTrace to observe the SQL statements on a live running MySQL database
- sant0sk1 18y agoThis looks really cool. Anybody know about DTrace support for Linux (specifically, Debian)?
- timtrueman 18y agoThere's a lot of debate about its license CDDL, versus the GPL. Either way there's a port being developed currently: http://www.crisp.demon.co.uk/blog/index.html http://www.crisp.demon.co.uk/blog/index.html
- orib 18y agoIt's not so much as a debate as the maintainers and legal people saying "hell no, their code is incompatible. you'll have to do a clean-room implementation for it to land", and some people saying "but we really want it." Plus, there are the usual "GPL is bad" trolls.
- balpreetspankaj 18y agoinstruments in Xcode is based on top of dtrace and is awesome.
- tptacek 18y agoOne thing this is useful for: security testing. Get your web application up and running under OpenSolaris, OS X or FreeBSD, then run a "web fuzzer" like Burp Suite or WebScarab against it, while watching the queries in the backend. It'll give you a quick and dirty way to see how user inputs are being passed through to the database.
- timtrueman 18y agoI generally use http://iank.org/querysniffer/mysqlsniff-0.10.html http://iank.org/querysniffer/mysqlsniff-0.10.html to get real queries. Works even on remote databases you don't have access to turn on query logging. Not to say DTrace isn't freaking awesome. (Check out Instruments in the Developer Tools on Leopard if you want to see DTrace but through a GUI).
- jbert 18y agoIt's not the greatest example (since there are various ways to get SQL queries from a live mysql db - tcpdump/ngrep, query logging or strace from a client - you could strace the server but mysql appears to die when you strace it - dunno why). Everyone who I know who has used dtrace loves it - so it seems likely to me that it is great+useful tech - but can someone come up with a real-world example of info it can give you that you can't get with tcpdump/strace?