Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sca-patterns-sle12 for 
openSUSE:Factory checked in at 2021-02-15 23:15:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sca-patterns-sle12 (Old)
 and      /work/SRC/openSUSE:Factory/.sca-patterns-sle12.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sca-patterns-sle12"

Mon Feb 15 23:15:50 2021 rev:10 rq:871300 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/sca-patterns-sle12/sca-patterns-sle12.changes    
2021-02-07 15:23:41.186176383 +0100
+++ 
/work/SRC/openSUSE:Factory/.sca-patterns-sle12.new.28504/sca-patterns-sle12.changes
 2021-02-15 23:17:55.847541923 +0100
@@ -1,0 +2,6 @@
+Thu Feb 11 21:46:09 UTC 2021 - jason.rec...@gmail.com
+
+- Additions to version 1.0.2
+  + Patterns for TID000019812 sshd process is having high CPU load
+
+-------------------------------------------------------------------

Old:
----
  sca-patterns-sle12-1.0.1.tar.gz

New:
----
  sca-patterns-sle12-1.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sca-patterns-sle12.spec ++++++
--- /var/tmp/diff_new_pack.91yvXz/_old  2021-02-15 23:17:56.475542861 +0100
+++ /var/tmp/diff_new_pack.91yvXz/_new  2021-02-15 23:17:56.479542867 +0100
@@ -25,7 +25,7 @@
 %define category SLE
 
 Name:           sca-patterns-sle12
-Version:        1.0.1
+Version:        1.0.2
 Release:        0
 Summary:        Supportconfig Analysis Patterns for SLE12
 License:        GPL-2.0-only

++++++ sca-patterns-sle12-1.0.1.tar.gz -> sca-patterns-sle12-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sca-patterns-sle12-1.0.1/patterns/SLE/sle12sp4/sshdcpu-000019812.py 
new/sca-patterns-sle12-1.0.2/patterns/SLE/sle12sp4/sshdcpu-000019812.py
--- old/sca-patterns-sle12-1.0.1/patterns/SLE/sle12sp4/sshdcpu-000019812.py     
1970-01-01 01:00:00.000000000 +0100
+++ new/sca-patterns-sle12-1.0.2/patterns/SLE/sle12sp4/sshdcpu-000019812.py     
2021-02-11 22:44:37.026398764 +0100
@@ -0,0 +1,99 @@
+#!/usr/bin/python
+
+# Title:       SSHD High CPU Load
+# Description: The sshd process is having high CPU load
+# Modified:    2021 Feb 11
+# Distro:      SLES12 SP4, SLES12 SP5
+#
+##############################################################################
+# Copyright (C) 2021, SUSE LLC
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+#  Authors/Contributors:
+#   Jason Record <jason.rec...@suse.com>
+#
+##############################################################################
+
+##############################################################################
+# Module Definition
+##############################################################################
+
+import os
+import Core
+import SUSE
+
+##############################################################################
+# Overriden (eventually or in part) from SDP::Core Module
+##############################################################################
+
+META_CLASS = "SLE"
+META_CATEGORY = "SSHD"
+META_COMPONENT = "CPU"
+PATTERN_ID = os.path.basename(__file__)
+PRIMARY_LINK = "META_LINK_TID"
+OVERALL = Core.TEMP
+OVERALL_INFO = "NOT SET"
+OTHER_LINKS = 
"META_LINK_TID=https://www.suse.com/support/kb/doc/?id=000019812|META_LINK_BUG=https://bugzilla.suse.com/show_bug.cgi?id=1179242";
+
+Core.init(META_CLASS, META_CATEGORY, META_COMPONENT, PATTERN_ID, PRIMARY_LINK, 
OVERALL, OVERALL_INFO, OTHER_LINKS)
+
+##############################################################################
+# Local Function Definitions
+##############################################################################
+
+def highCPU():
+       fileOpen = "basic-health-check.txt"
+       section = "/ps axwwo"
+       content = {}
+       CPUTIL_WHOLE_IDX = 3
+       CPUTIL_INTEGER_IDX = 0
+       MAX_CPUTIL = 70
+       CPU_CURRENT = 0
+       CPU_MAX = 0     
+       if Core.getSection(fileOpen, section, content):
+               for line in content:
+                       if " sshd: " in content[line]:
+                               CPU_CURRENT = 
content[line].split()[CPUTIL_WHOLE_IDX].split('.')[CPUTIL_INTEGER_IDX]
+                               if( int(CPU_CURRENT) > CPU_MAX ):
+                                       CPU_MAX = CPU_CURRENT
+               if( CPU_MAX >= MAX_CPUTIL ):
+                       return True
+       return False
+
+##############################################################################
+# Main Program Execution
+##############################################################################
+
+RPM_NAME = 'openssh'
+RPM_VERSION_BROKE = '7.2p2-78.4.2'
+RPM_VERSION_FIXED = '7.2p2-78.7.1'
+if( SUSE.packageInstalled(RPM_NAME) ):
+       INSTALLED_VERSION = SUSE.compareRPM(RPM_NAME, RPM_VERSION_BROKE)
+       if( INSTALLED_VERSION == 0 ):
+               if( highCPU() ):
+                       Core.updateStatus(Core.CRIT, "Detected high CPU 
utilization for sshd processes, update server for fixes")
+               else:
+                       Core.updateStatus(Core.WARN, "High CPU utilization on 
sshd connections possible, update server for fixes")
+       else:
+               INSTALLED_VERSION = SUSE.compareRPM(RPM_NAME, RPM_VERSION_FIXED)
+               if( INSTALLED_VERSION >= 0 ):
+                       Core.updateStatus(Core.IGNORE, "Bug fixes applied for " 
+ RPM_NAME + " and high CPU utilization")
+               else:
+                       Core.updateStatus(Core.IGNORE, "Previously unaffected 
version of " + RPM_NAME + " installed")
+else:
+       Core.updateStatus(Core.ERROR, "ERROR: " + RPM_NAME + " not installed")
+
+Core.printPatternResults()
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sca-patterns-sle12-1.0.1/patterns/SLE/sle12sp5/sshdcpu-000019812.py 
new/sca-patterns-sle12-1.0.2/patterns/SLE/sle12sp5/sshdcpu-000019812.py
--- old/sca-patterns-sle12-1.0.1/patterns/SLE/sle12sp5/sshdcpu-000019812.py     
1970-01-01 01:00:00.000000000 +0100
+++ new/sca-patterns-sle12-1.0.2/patterns/SLE/sle12sp5/sshdcpu-000019812.py     
2021-02-11 22:44:28.654611849 +0100
@@ -0,0 +1,99 @@
+#!/usr/bin/python
+
+# Title:       SSHD High CPU Load
+# Description: The sshd process is having high CPU load
+# Modified:    2021 Feb 11
+# Distro:      SLES12 SP4, SLES12 SP5
+#
+##############################################################################
+# Copyright (C) 2021, SUSE LLC
+##############################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+#  Authors/Contributors:
+#   Jason Record <jason.rec...@suse.com>
+#
+##############################################################################
+
+##############################################################################
+# Module Definition
+##############################################################################
+
+import os
+import Core
+import SUSE
+
+##############################################################################
+# Overriden (eventually or in part) from SDP::Core Module
+##############################################################################
+
+META_CLASS = "SLE"
+META_CATEGORY = "SSHD"
+META_COMPONENT = "CPU"
+PATTERN_ID = os.path.basename(__file__)
+PRIMARY_LINK = "META_LINK_TID"
+OVERALL = Core.TEMP
+OVERALL_INFO = "NOT SET"
+OTHER_LINKS = 
"META_LINK_TID=https://www.suse.com/support/kb/doc/?id=000019812|META_LINK_BUG=https://bugzilla.suse.com/show_bug.cgi?id=1179242";
+
+Core.init(META_CLASS, META_CATEGORY, META_COMPONENT, PATTERN_ID, PRIMARY_LINK, 
OVERALL, OVERALL_INFO, OTHER_LINKS)
+
+##############################################################################
+# Local Function Definitions
+##############################################################################
+
+def highCPU():
+       fileOpen = "basic-health-check.txt"
+       section = "/ps axwwo"
+       content = {}
+       CPUTIL_WHOLE_IDX = 3
+       CPUTIL_INTEGER_IDX = 0
+       MAX_CPUTIL = 70
+       CPU_CURRENT = 0
+       CPU_MAX = 0     
+       if Core.getSection(fileOpen, section, content):
+               for line in content:
+                       if " sshd: " in content[line]:
+                               CPU_CURRENT = 
content[line].split()[CPUTIL_WHOLE_IDX].split('.')[CPUTIL_INTEGER_IDX]
+                               if( int(CPU_CURRENT) > CPU_MAX ):
+                                       CPU_MAX = CPU_CURRENT
+               if( CPU_MAX >= MAX_CPUTIL ):
+                       return True
+       return False
+
+##############################################################################
+# Main Program Execution
+##############################################################################
+
+RPM_NAME = 'openssh'
+RPM_VERSION_BROKE = '7.2p2-78.4.2'
+RPM_VERSION_FIXED = '7.2p2-78.7.1'
+if( SUSE.packageInstalled(RPM_NAME) ):
+       INSTALLED_VERSION = SUSE.compareRPM(RPM_NAME, RPM_VERSION_BROKE)
+       if( INSTALLED_VERSION == 0 ):
+               if( highCPU() ):
+                       Core.updateStatus(Core.CRIT, "Detected high CPU 
utilization for sshd processes, update server for fixes")
+               else:
+                       Core.updateStatus(Core.WARN, "High CPU utilization on 
sshd connections possible, update server for fixes")
+       else:
+               INSTALLED_VERSION = SUSE.compareRPM(RPM_NAME, RPM_VERSION_FIXED)
+               if( INSTALLED_VERSION >= 0 ):
+                       Core.updateStatus(Core.IGNORE, "Bug fixes applied for " 
+ RPM_NAME + " and high CPU utilization")
+               else:
+                       Core.updateStatus(Core.IGNORE, "Previously unaffected 
version of " + RPM_NAME + " installed")
+else:
+       Core.updateStatus(Core.ERROR, "ERROR: " + RPM_NAME + " not installed")
+
+Core.printPatternResults()
+

Reply via email to