[checkmk-commits] Check_MK Git: check_mk: Fix rendering of network interface speeds

Mathias Kettner mk at mathias-kettner.de
Fri Apr 17 16:53:43 CEST 2015


Module: check_mk
Branch: master
Commit: c0dd4945e9e52f293d7a2fafa01dbcb2809048f0
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c0dd4945e9e52f293d7a2fafa01dbcb2809048f0

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Fri Apr 17 16:51:05 2015 +0200

Fix rendering of network interface speeds

---

 modules/check_mk_base.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 746b585..b0c9784 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1952,11 +1952,11 @@ def get_nic_speed_human_readable(speed):
             speed = "100 Mbit/s"
         elif speedi == 1000000000:
             speed = "1 Gbit/s"
-        elif speed < 1500:
+        elif speedi < 1500:
             speed = "%d bit/s" % speedi
-        elif speed < 1000000:
+        elif speedi < 1000000:
             speed = "%.1f Kbit/s" % (speedi / 1000.0)
-        elif speed < 1000000000:
+        elif speedi < 1000000000:
             speed = "%.2f Mbit/s" % (speedi / 1000000.0)
         else:
             speed = "%.2f Gbit/s" % (speedi / 1000000000.0)



More information about the checkmk-commits mailing list