mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-23 06:35:42 +00:00
Merge pull request #481 from ShiningRay/master
coerce lockTime to float type
This commit is contained in:
commit
e4ef822e5c
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ name = "locked"
|
||||||
def doData():
|
def doData():
|
||||||
status = getServerStatus()
|
status = getServerStatus()
|
||||||
if status["version"] >= "2.2.0":
|
if status["version"] >= "2.2.0":
|
||||||
ratio = status["globalLock"]["lockTime"] / status["globalLock"]["totalTime"]
|
ratio = float(status["globalLock"]["lockTime"]) / status["globalLock"]["totalTime"]
|
||||||
else:
|
else:
|
||||||
ratio = status["globalLock"]["ratio"]
|
ratio = status["globalLock"]["ratio"]
|
||||||
print name + ".value " + str( 100 * ratio )
|
print name + ".value " + str( 100 * ratio )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue