saphostexec - Commands

Shared parsers for parsing output of the saphostexec [option] commands.

SAPHostExecStatus- command saphostexec -status

SAPHostExecVersion - command saphostexec -version

class insights.parsers.saphostexec.SAPHostExecStatus(context, extra_bad_lines=[])[source]

Bases: insights.core.CommandParser, insights.core.LegacyItemAccess

Class for parsing the output of saphostexec -status command.

Typical output of the command is:

saphostexec running (pid = 9159)
sapstartsrv running (pid = 9163)
saposcol running (pid = 9323)
is_running

The SAP Host Agent is running or not.

Type

bool

services

List of services.

Type

list

Examples

>>> type(sha_status)
<class 'insights.parsers.saphostexec.SAPHostExecStatus'>
>>> sha_status.is_running
True
>>> sha_status.services['saphostexec']
'9159'
parse_content(content)[source]

This method must be implemented by classes based on this class.

class insights.parsers.saphostexec.SAPHostExecVersion(context, extra_bad_lines=[])[source]

Bases: insights.core.CommandParser, insights.core.LegacyItemAccess

Class for parsing the output of saphostexec -version command.

Typical output of the command is:

*************************** Component ********************
/usr/sap/hostctrl/exe/saphostexec: 721, patch 1011, changelist 1814854, linuxx86_64, opt (Jan 13 2018, 04:43:56)
/usr/sap/hostctrl/exe/sapstartsrv: 721, patch 1011, changelist 1814854, linuxx86_64, opt (Jan 13 2018, 04:43:56)
/usr/sap/hostctrl/exe/saphostctrl: 721, patch 1011, changelist 1814854, linuxx86_64, opt (Jan 13 2018, 04:43:56)
/usr/sap/hostctrl/exe/xml71d.so: 721, patch 1011, changelist 1814854, linuxx86_64, opt (Jan 13 2018, 01:12:10)
**********************************************************
--------------------
SAPHOSTAGENT information
--------------------
kernel release                721
kernel make variant           721_REL
compiled on                   Linux GNU SLES-9 x86_64 cc4.1.2  for linuxx86_64
compiled for                  64 BIT
compilation mode              Non-Unicode
compile time                  Jan 13 2018 04:40:52
patch number                  33
latest change number          1814854
---------------------
supported environment
---------------------
operating system
Linux 2.6
Linux 3
Linux
components

Dict of SAPComponent instances.

Type

dict

Examples

>>> type(sha_version)
<class 'insights.parsers.saphostexec.SAPHostExecVersion'>
>>> sha_version.components['saphostexec'].version
'721'
>>> sha_version.components['saphostexec'].patch
'1011'
class SAPComponent(version, patch, changelist)

Bases: tuple

namedtuple: Type for storing the SAP components

property changelist
property patch
property version
parse_content(content)[source]

This method must be implemented by classes based on this class.