Module: check_mk
Branch: master
Commit: 4b15d4dd2c486306e9032f096e5218c4438681e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4b15d4dd2c4863…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 5 11:50:10 2015 +0200
#2226 FIX prtconf: Fix computation of CPU clock speed: 1MHz is 1000^2 Hz, not 1024^2
---
.werks/2226 | 10 ++++++++++
ChangeLog | 1 +
inventory/prtconf | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2226 b/.werks/2226
new file mode 100644
index 0000000..641408e
--- /dev/null
+++ b/.werks/2226
@@ -0,0 +1,10 @@
+Title: prtconf: Fix computation of CPU clock speed: 1MHz is 1000^2 Hz, not 1024^2
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1430819374
+
+
diff --git a/ChangeLog b/ChangeLog
index d367edf..edde7a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -547,6 +547,7 @@
* 2197 FIX: win_reg_uninstall: Fix exception in case of invalid output line...
* 2224 FIX: Fixed sorting in inventory based views...
* 2246 FIX: Linux CPU Inventory: Fixed wrong number of CPUs when first CPU is not in
first slot
+ * 2226 FIX: prtconf: Fix computation of CPU clock speed: 1MHz is 1000^2 Hz, not
1024^2
1.2.6b1:
diff --git a/inventory/prtconf b/inventory/prtconf
index 2147c85..c9326ea 100644
--- a/inventory/prtconf
+++ b/inventory/prtconf
@@ -77,7 +77,7 @@ def inv_prtconf(info):
inv_tree("hardware.cpu.")["model"] = value
elif varname == "Processor Clock Speed":
- inv_tree("hardware.cpu.")["max_speed"] =
float(value.split()[0]) * 1024 * 1024
+ inv_tree("hardware.cpu.")["max_speed"] =
float(value.split()[0]) * 1000 * 1000
elif varname == "Number Of Processors":
inv_tree("hardware.cpu.")["cpus"] = int(value)