Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics about current transactions and locks #2

Open
flaviostutz opened this issue Sep 15, 2020 · 1 comment
Open

Metrics about current transactions and locks #2

flaviostutz opened this issue Sep 15, 2020 · 1 comment

Comments

@flaviostutz
Copy link
Contributor

TRANSACTION

db.runCommand( { serverStatus: 0, repl: 0, metrics: 0, locks: 1 } )

    "transactions" : {
            "currentOpen" : NumberLong(0),
            "currentActive" : NumberLong(0),
            "currentInactive" : NumberLong(0),
            "totalStarted" : NumberLong(0),
            "totalCommitted" : NumberLong(0),
            "totalAborted" : NumberLong(0),
            "abortCause" : {

            },
            "totalContactedParticipants" : NumberLong(0),
            "totalParticipantsAtCommit" : NumberLong(0),
            "totalRequestsTargeted" : NumberLong(0),
            "commitTypes" : {
                    "noShards" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    },
                    "singleShard" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    },
                    "singleWriteShard" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    },
                    "readOnly" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    },
                    "twoPhaseCommit" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    },
                    "recoverWithToken" : {
                            "initiated" : NumberLong(0),
                            "successful" : NumberLong(0),
                            "successfulDurationMicros" : NumberLong(0)
                    }
            }
    },
@flaviostutz
Copy link
Contributor Author

SHOW CURRENT OPS WAITING FOR LOCKS

db.currentOp(
{
$and: [
{"waitingForLock" : true},
{"ns" : "edidatico.testes-estudantes"}
]
}
)

db.currentOp(
{
$and: [
{"waitingForLock" : true},
{"ns" : "edidatico.testes-cadastro"}
]
}
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant