Module: check_mk
Branch: master
Commit: 53c0805062a0991fe2ba5302147d0bfa19fdd48a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=53c0805062a099…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Mar 2 10:18:01 2011 +0100
if/if64: output speed correctly
---
ChangeLog | 1 +
modules/check_mk_base.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0fe0819..12b5622 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
This is still experimental!
Checks & Agents:
+ * FIX: if/if64: output speed correctly (1.50MB/s instead of 1MB/s)
* FIX: drbd now handles output of older version without an ep field
* FIX: repaired df_netapp32
* FIX: Added SNMP scan function of df_netapp and df_netapp32
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index e012d92..8685fb0 100755
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1027,9 +1027,9 @@ def get_nic_speed_human_readable(speed):
elif speedi == 1000000000:
speed = "1GBit/s"
elif speed < 1500000000:
- speed = "%dMBit/s" % (speedi / 1000000)
+ speed = "%.2fMBit/s" % (speedi / 1000000.0)
else:
- speed = "%dGBit/s" % (speedi / 1000000000)
+ speed = "%.2fGBit/s" % (speedi / 1000000000.0)
except:
pass
return speed