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=None)[source]
Bases:
CommandParser
,dict
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)
Examples
>>> type(sha_status) <class 'insights.parsers.saphostexec.SAPHostExecStatus'> >>> sha_status.is_running True >>> sha_status.services['saphostexec'].status 'running' >>> sha_status['saphostexec'].status 'running' >>> sha_status['saphostexec'].pid '9159'
- class SAPHostAgentService(status, pid)
Bases:
tuple
namedtuple: Type for storing the lines of
saphostexec -status
- pid
- status
- property data
Warning
Deprecated, the parser works as a dict please use the built-in accesses of dict
Returns the parsed data.
- property is_running
Returns if the SAPHostAgent is running or not.
- property services
Returns the parsed lines.
- class insights.parsers.saphostexec.SAPHostExecVersion(context, extra_bad_lines=None)[source]
Bases:
CommandParser
,dict
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
Examples
>>> type(sha_version) <class 'insights.parsers.saphostexec.SAPHostExecVersion'> >>> sha_version.components['saphostexec'].version '721' >>> sha_version['saphostexec'].version '721' >>> sha_version['saphostexec'].patch '1011'
- class SAPHostAgentComponent(version, patch, changelist)
Bases:
tuple
namedtuple: Type for storing the lines of
saphostexec -version
- changelist
- patch
- version
- property components
Return the dict of
SAPHostAgentComponent
instances.
- property data
Warning
Deprecated, the parser works as a dict please use the built-in accesses of dict
Returns the parsed data.