mongodb查看当面正在运行的操作
时间:2010-12-16 来源:george.ma
mongodb查看当面正在运行的操作:
>db.currentOp(); Fields:
opid - an incrementing operation number. Use with killOp().
op - the operation type (query, update, etc.)
ns - namespace for the operation (database + collection name)
query - the query spec, if operation is a query
lockType - the type of lock the operation requires, either read or write or none. See concurrency page.
waitingForLock - if true, lock has been requested but not yet granted
client - address of the client who requested the operation
desc - the type of connection. conn indicates a normal client connections. Other values indicate internal threads in the server. 杀掉某个操作,注意不要kill内部发起的操作,比如说replica set发起的sync操作等
> db.killOp(1234/*opid*/)
> // same as: db.$cmd.sys.killop.findOne({op:1234}) 作者george.ma blog:http://blog.chinaunix.net/u/12521/
>db.currentOp(); Fields:
opid - an incrementing operation number. Use with killOp().
op - the operation type (query, update, etc.)
ns - namespace for the operation (database + collection name)
query - the query spec, if operation is a query
lockType - the type of lock the operation requires, either read or write or none. See concurrency page.
waitingForLock - if true, lock has been requested but not yet granted
client - address of the client who requested the operation
desc - the type of connection. conn indicates a normal client connections. Other values indicate internal threads in the server. 杀掉某个操作,注意不要kill内部发起的操作,比如说replica set发起的sync操作等
> db.killOp(1234/*opid*/)
> // same as: db.$cmd.sys.killop.findOne({op:1234}) 作者george.ma blog:http://blog.chinaunix.net/u/12521/
相关阅读 更多 +