Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10003

Clarification needed for serverStatus globalLock.activeClients.total

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      According to the serverStatus documentation globalLock.activeClients.total is:

      The total number of active client connections to the database (i.e., the sum of globalLock.activeClients.readers and globalLock.activeClients.writers).

      This used to be correct for MongoDB 2.6 and earlier, but MongoDB 3.0+ appears to have changed the calculation. The total is perhaps including internal system operations since it seems to align with the number of running operations as reported by db.currentOp(true).inprog.length.

      Example from MongoDB 3.4.2:

      > db.serverStatus().globalLock.activeClients
      {
        "total": 11,
        "readers": 0,
        "writers": 0
      }
      

      The description of "client connections" also makes it easy to conflate this with the metric users are probably looking for: db.serverStatus().connections.current.

      Attachments

        Activity

          People

            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 15 weeks, 2 days ago