Created
April 18, 2013 08:13
-
-
Save tairov/5411066 to your computer and use it in GitHub Desktop.
stats, all collections, all databases, mongodb
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
/opt/mongodb/bin/mongo --port 27017 --eval "db._adminCommand(\"listDatabases\").databases.forEach(function (d) {mdb = db.getSiblingDB(d.name); mdb.getCollectionNames().forEach(function(c) {s = mdb[c].stats(1024 * 1024); printjson(s)})})" | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment