[SERVER-5085] Command to list current connections Created: 24/Feb/12  Updated: 15/Aug/12  Resolved: 24/Feb/12

Status: Closed
Project: Core Server
Component/s: Admin, Networking, Security, Tools, Usability
Affects Version/s: 2.0.2
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Jared D. Cottrell Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It would be useful for diagnostic and monitoring purposes to be able to list some basic information about each connection at any given time:

  • Connection number
  • IP address, port
  • Authenticated db, username
  • Created date, time
  • Last used (or some indication of idleness)
  • Current op


 Comments   
Comment by Eliot Horowitz (Inactive) [ 24/Feb/12 ]

Yes - that's for listing all connections.

Please do submit any features you want added.

Just to note: auth is going to be tricky since its per connection/db, so might end up being a document of

{ db : < user > , ... }
Comment by Jared D. Cottrell [ 24/Feb/12 ]

So is db.currentOp(true) intended to be the utility to list connections? I could file improvement tickets for the missing info.

For example, the output doesn't include the most critical bit of info: auth credentials. This is most commonly used to figure out where all the connections are coming from.

Comment by Eliot Horowitz (Inactive) [ 24/Feb/12 ]

db.currentOp( true )
does this

can do it as:
db.$cmd.sys.inprog.findOne(

{ $all : true }

)

Generated at Thu Feb 08 03:07:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.