Created
August 21, 2012 10:37
-
-
Save yuriyvolkov/3414360 to your computer and use it in GitHub Desktop.
few commands to dig into mongodb profiling data
This file contains 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
db.setProfilingLevel(2); | |
db.getProfilingLevel(); | |
db.getProfilingStatus(); | |
//to see output without $cmd (command) operations | |
db.system.profile.find( function() { return this.info.indexOf('$cmd')<0; } ); | |
//To view operations for a particular collection | |
db.system.profile.find( { info: /test.foo/ } ); | |
//To view operations slower than a certain number of milliseconds | |
db.system.profile.find( { millis : { $gt : 5 } } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment