Skip to content

Instantly share code, notes, and snippets.

@benve
Created June 21, 2011 09:32
Show Gist options
  • Save benve/1037527 to your computer and use it in GitHub Desktop.
Save benve/1037527 to your computer and use it in GitHub Desktop.
Esempi MongoDB
//Per ottenere gli ultimi mongos connessi al cluster
//Collegarsi ad un mongos
use config
//Stampa i mongos che hanno risposto al ping negli ultimi 5 minuti
db.mongos.find({ "ping" : { $gt : new Date((new Date) - 5 * 60 * 1000) }}).forEach(printjson)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment