Kristina (MongoDB’s author of the PHP and Perl driver) has published a quick and excellent introduction to mongosniff.
Writing an application on top of a framework on top of a driver on top of the database is a bit like playing telephone: you say “insert foo” and the database says “purple monkey dishwasher.” mongosniff lets you see exactly what the database is hearing and saying.
I wasn’t even aware of this little gem of a tool. I’ve been stuck in a few situations where I’ve often wondered what was going on in the background.
via A Quick Intro to mongosniff.
