How to view requests made by my mongodb?

I continue to see this in my /development.log log, and I wonder if this query is actually being executed in my database:

MONGODB (0ms) socialcrunch_development['tags'].find({:_id=>"secrets"}).limit(-1).sort([[:_id, :asc]]) 

Ho, I can see the queries being executed on my mongo db, so I can count them, should they even be .find commands, or do I need to look for something else?

+4
source share
2 answers

Print all active messages:

 db.currentOp().inprog.forEach( function(d){ if(d.waitingForLock && d.lockType != "read") printjson(d) }) 

Print all active entries:

 db.currentOp().inprog.forEach( function(d){ if(d.waitingForLock && d.lockType != "write") printjson(d) }) 

You can get much more detailed if you want, using currentOp.op to filter by a specific type of operation (insert, update, delete, etc.).

For more information, see the following MongoDB.org documentation page: http://docs.mongodb.org/manual/reference/current-op/

+7
source

http://www.mongovue.com/ provides a good ui interface for checking server status on the server

+1
source

All Articles