Chinaunix首页 | 论坛 | 博客
  • 博客访问: 769915
  • 博文数量: 185
  • 博客积分: 7434
  • 博客等级: 少将
  • 技术积分: 2325
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-29 14:01
文章分类

全部博文(185)

文章存档

2013年(1)

2012年(2)

2011年(17)

2010年(25)

2009年(36)

2008年(104)

分类: 数据库开发技术

2010-12-16 15:25:16

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/
阅读(1180) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~