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

fix for globalLock.ration value #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

michalekn
Copy link

Since mongo 2.2 there is no info in globalLock.ratio but it can be counted manually by dividing globalLock.lockTime and globalLock.totalTime. This fix doing it.

@tianon
Copy link

tianon commented Nov 6, 2012

It would also be useful if it were to loop over the value of getServerStatus()["locks"] and give us a ratio for each one, since MongoDB now does database-level locking, and these values represent the lock time for each database separately.

@jlecour
Copy link

jlecour commented Nov 8, 2012

@tianon It's a detail, but he correct command is db.serverStatus()["locks"].

Otherwise, I get this :

> db.getServerStatus()["locks"]
Thu Nov  8 17:38:10 TypeError: db.getServerStatus is not a function (shell):1

@jlecour
Copy link

jlecour commented Nov 8, 2012

My bad, I didn't see that the function was from the script, not from MongoDB itself.

Sorry for the n00b noise.

@tianon
Copy link

tianon commented Nov 8, 2012

No worries; I had the exact same thought initially until I looked closer at
the script.

  • Andrew

On 8 November 2012 10:05, Jérémy Lecour [email protected] wrote:

My bad, I didn't see that the function was from the script, not from
MongoDB itself.

Sorry for the n00b noise.


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-10195901.

@jlecour
Copy link

jlecour commented Nov 8, 2012

I've tried this patch, and I get a growing value, always > 1.0 which doesn't look like a percentage.

RBLU pushed a commit to YouPers/mongo-munin that referenced this pull request Feb 16, 2016
fixed how to configure custom db connection
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

Successfully merging this pull request may close these issues.

3 participants