diff options
author | Mathias Stearn <mathias@10gen.com> | 2010-02-22 21:23:20 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2010-02-22 21:23:20 -0500 |
commit | a561c31a23ef0d69f89a21e7eebe61f67d7e1475 (patch) | |
tree | 783b27470d72aafab226c55e9d8f2d632c2752ec /shell | |
parent | 079031215d946eb118f6228a36eb04dc53b9dac4 (diff) | |
download | mongo-a561c31a23ef0d69f89a21e7eebe61f67d7e1475.tar.gz |
Database-wide dbstats command SERVER-596
Diffstat (limited to 'shell')
-rw-r--r-- | shell/db.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/db.js b/shell/db.js index 0a9faab3f26..c6955d651c0 100644 --- a/shell/db.js +++ b/shell/db.js @@ -20,6 +20,10 @@ DB.prototype.getName = function(){ return this._name; } +DB.prototype.stats = function(){ + return this.runCommand( { dbstats : 1 } ); +} + DB.prototype.getCollection = function( name ){ return new DBCollection( this._mongo , this , name , this._name + "." + name ); } @@ -280,6 +284,7 @@ DB.prototype.help = function() { print("\tdb.runCommand(cmdObj) run a database command. if cmdObj is a string, turns it into { cmdObj : 1 }"); print("\tdb.setProfilingLevel(level,<slowms>) 0=off 1=slow 2=all"); print("\tdb.shutdownServer()"); + print("\tdb.stats()"); print("\tdb.version() current version of the server" ); } |