MongoDB Process Control Series One: View the currently executing process

Source: Internet
Author: User

1: See what is currently being done by MongoDB?

Db.currentop () is equivalent to: db. $cmd. Sys.inprog.findOne ()

  

2: Detailed Currentop ()

Gechongrepl:primary> Db.currentop () {"InProg": [{"Opid": 6222, "active": true, "secs_running": 3, "microsecs_running ": Numberlong (3662328)," Op ":" Getmore "," ns ":" local.oplog.rs "," query ": {}," client ":" 192.168.91.132:45745 "," desc ":" Conn5 "," threadId ":" 0x7f1370cb4700 "," ConnectionID ": 5," Waitingforlock ": false," Numyields ": 0," Lockstats ": {" Timelockedmicros ": {" R ": Numberlong (141)," W ": Numberlong (0)}," Timeacquiringmicros ": {" R ": Numberlong (+)," W ": Number Long (0)}}}]}

"Opid": 6222, #进程号
"Active": true, #是否活动状态
"Secs_running": 3, #操作运行了多少秒
"Microsecs_running": Numberlong (3662328),
"Op": "Getmore", #操作类型, including (Insert/query/update/remove/getmore/command)
"NS": "Local.oplog.rs", #命名空间
"Query": {},#如果op是查询操作, this will show the contents of the query, also said here to show the specific action statement

"Client": "192.168.91.132:45745", #连接的客户端信息
"desc": "Conn5", #数据库的连接信息
"ThreadId": "0x7f1370cb4700", #线程ID
"ConnectionID": 5, #数据库的连接ID
"Waitingforlock": false, #是否等待获取锁
"Numyields": 0,
"Lockstats": {
"Timelockedmicros": {#持有的锁时间微秒
"R": Numberlong (141), #整个MongoDB实例的全局读锁
"W": Numberlong (0)}, #整个MongoDB实例的全局写锁
"Timeacquiringmicros": {#为了获得锁, microsecond time to wait
"R": Numberlong (+), #整个MongoDB实例的全局读锁
"W": Numberlong (0)} #整个MongoDB实例的全局写锁

MongoDB Process Control Series One: View the currently executing process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.