diff options
author | Dwight <dmerriman@gmail.com> | 2009-12-22 15:22:37 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-12-22 15:22:37 -0500 |
commit | 62522b905bf96e12abd5d176ad1b70c2cb669930 (patch) | |
tree | f7e402e976f3c220d0fc84f9fcd7ec0646bd2cb4 /shell | |
parent | 2c1085d3a7c589045f8606e1a8c9900d1471e362 (diff) | |
download | mongo-62522b905bf96e12abd5d176ad1b70c2cb669930.tar.gz |
new killOp(opnumber)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/db.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/db.js b/shell/db.js index d4ccb2dfd56..118c3e44ac5 100644 --- a/shell/db.js +++ b/shell/db.js @@ -259,7 +259,7 @@ DB.prototype.help = function() { print("\tdb.getProfilingLevel()"); print("\tdb.getReplicationInfo()"); print("\tdb.getSisterDB(name) get the db at the same server as this onew"); - print("\tdb.killOp() kills the current operation in the db" ); + print("\tdb.killOp(opid) kills the current operation in the db" ); print("\tdb.printCollectionStats()" ); print("\tdb.printReplicationInfo()"); print("\tdb.printSlaveReplicationInfo()"); @@ -513,8 +513,10 @@ DB.prototype.currentOp = function(){ } DB.prototype.currentOP = DB.prototype.currentOp; -DB.prototype.killOp = function(){ - return db.$cmd.sys.killop.findOne(); +DB.prototype.killOp = function(op) { + if( !op ) + throw "no opNum to kill specified"; + return db.$cmd.sys.killop.findOne({'op':op}); } DB.prototype.killOP = DB.prototype.killOp; |