mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
coerce lockTime to float type
otherwise we'll always get 0 from integer division.
This commit is contained in:
parent
d2847dc508
commit
96116a460b
@ -20,7 +20,7 @@ name = "locked"
|
||||
def doData():
|
||||
status = getServerStatus()
|
||||
if status["version"] >= "2.2.0":
|
||||
ratio = status["globalLock"]["lockTime"] / status["globalLock"]["totalTime"]
|
||||
ratio = float(status["globalLock"]["lockTime"]) / status["globalLock"]["totalTime"]
|
||||
else:
|
||||
ratio = status["globalLock"]["ratio"]
|
||||
print name + ".value " + str( 100 * ratio )
|
||||
|
Loading…
Reference in New Issue
Block a user