Module: check_mk
Branch: master
Commit: 37314b619a9c1bfa8876029a87beddc4b07014ea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=37314b619a9c1b…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jun 8 13:18:25 2017 +0200
4776 FIX solaris_psrinfo: Fixed handling of newer output eg. of Solaris SPARC T5
Change-Id: Ibed192241c93acdb796111529fd13641c60d7e32
---
.werks/4776 | 11 +++++++++++
inventory/solaris_psrinfo | 26 ++++++++++++++++++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/.werks/4776 b/.werks/4776
new file mode 100644
index 0000000..6ce0224
--- /dev/null
+++ b/.werks/4776
@@ -0,0 +1,11 @@
+Title: solaris_psrinfo: Fixed handling of newer output eg. of Solaris SPARC T5
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496920610
+
+
diff --git a/inventory/solaris_psrinfo b/inventory/solaris_psrinfo
index 5821ae7..596e1d1 100644
--- a/inventory/solaris_psrinfo
+++ b/inventory/solaris_psrinfo
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-#Example output:
+
#<<<solaris_psrinfo:persist(1405715354)>>>
#The physical processor has 8 virtual processors (0-7)
# SPARC64-VII+ (portid 1024 impl 0x7 ver 0xc1 clock 2660 MHz)
@@ -35,12 +35,30 @@
#The physical processor has 8 virtual processors (24-31)
# SPARC64-VII+ (portid 1048 impl 0x7 ver 0xc1 clock 2660 MHz)
+#<<<solaris_psrinfo:persist(1405715354)>>>
+#The physical processor has 10 cores and 80 virtual processors (0-79)
+# The core has 8 virtual processors (0-7)
+# The core has 8 virtual processors (8-15)
+# The core has 8 virtual processors (16-23)
+# The core has 8 virtual processors (24-31)
+# The core has 8 virtual processors (32-39)
+# The core has 8 virtual processors (40-47)
+# The core has 8 virtual processors (48-55)
+# The core has 8 virtual processors (56-63)
+# The core has 8 virtual processors (64-71)
+# The core has 8 virtual processors (72-79)
+# SPARC-T5 (chipid 0, clock 3600 MHz)
+
+#<<<solaris_psrinfo:persist(1405715354)>>>
+#The physical processor has 8 virtual processors (0-7)
+# SPARC-T5 (chipid 0, clock 3600 MHz)
+
def inv_solaris_psrinfo(info):
- solaris_uname = {}
node = inv_tree("hardware.cpu.")
- node["Model"] = info[1][0]
- node["Maximum Speed"] = "%s %s" %(info[1][-2],
info[1][-1].strip(')') )
+ node["Model"] = info[-1][0]
+ node["Maximum Speed"] = "%s %s" %(info[-1][-2],
info[-1][-1].strip(')') )
+
inv_info['solaris_psrinfo'] = {
"inv_function" : inv_solaris_psrinfo,