Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-33363

Getting list of connections per database

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 3.6.0
    • Networking
    • None

    Description

      Hello,

      Wondering if there is a way to get a list of connections on a per database basis. I've looked into using db.currentOp(true).inprog which list several connections, but does not show which database it is associated with (see below for example).

              {
                      "desc" : "conn2",
                      "threadId" : "140536019457792",
                      "connectionId" : 2,
                      "client" : "172.17.0.1:38292",
                      "active" : false
              },
      

      It would be great to have the database name associated with it (as long as that connection did a 'use' or similar command to connect to it).

      An even better option would be to list databases (as long as they have live connections) and have the connections listed under their individual names.

      Thanks.

      Attachments

        Activity

          People

            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            bhairav Bhairav
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: