Created
July 11, 2012 11:24
-
-
Save coldclimate/3089756 to your computer and use it in GitHub Desktop.
Find the slowest 20 running queries in the last 100,000 entries in your mongo logs
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
tail -100000 mongod.log | gawk -F' ' '{print $NF}' | grep ms$ | sed 's/ms//g' |sort -n | tail -20 | xargs -I {} grep {}ms$ mongod.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment