LdLibraryPath - LD_LIBRARY_PATH of Users

Parser for parsing the environment variable LD_LIBRARY_PATH of each user

class insights.parsers.ld_library_path.LdLibraryPath(user, path, raw)

Bases: tuple

namedtuple: Type for storing the LD_LIBRARY_PATH of users

property path
property raw
property user
class insights.parsers.ld_library_path.UserLdLibraryPath(context)[source]

Bases: insights.core.Parser, list

Base class for parsing the LD_LIBRARY_PATH variable of each regular user of the system into a list.

Note

Currently, only the LD_LIBRARY_PATH SAP users is collected, where the username is merged by SID and “adm”.

Typical content looks like:

sr1adm /usr/sap/RH1/SYS/exe/run:/usr/sap/RH1/SYS/exe/uc/linuxx86_64:/sapdb/clients/RH1/lib
sr2adm
rh1adm /usr/sap/RH1/SYS/exe/uc/linuxx86_64:/usr/sap/RH1/SYS/exe/run

Examples

>>> len(ld_lib_path)
3
>>> isinstance(ld_lib_path[0].path, list)
True
>>> len(ld_lib_path[0].path)
3
>>> '/sapdb/clients/RH1/lib' in ld_lib_path[0].path
True
>>> ld_lib_path[1].user  # The empty value is kept.
'sr2adm'
>>> '' in ld_lib_path[1].path  # The empty value is kept.
True
Raises

SkipException -- When the output is empty or nothing needs to parse.

parse_content(content)[source]

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