Combiners for the parsers which parse the output of modinfo <module_name>

ModInfo

The ModInfo combiner gathers all the ModInfoEach parsers into a dictionary indexed by the module name.

ModulesInfo

The ModulesInfo combines the collected modules info from the result of KernelModulesInfo.

class insights.combiners.modinfo.ModInfo(mi_all, mi_each)[source]

Bases: dict

Warning

This combiner is deprecated, please use insights.combiners.modinfo.ModulesInfo instead.

Combiner for accessing all the modinfo outputs.

Examples

>>> type(modinfo_obj)
<class 'insights.combiners.modinfo.ModInfo'>
>>> type(modinfo_obj['i40e'])
<class 'insights.parsers.modinfo.ModInfoEach'>
>>> modinfo_obj['i40e'].module_name
'i40e'
>>> modinfo_obj['i40e'].module_name
'i40e'
>>> modinfo_obj['i40e']['retpoline']
'Y'
>>> modinfo_obj['i40e'].module_version
'2.3.2-k'
>>> modinfo_obj['i40e'].module_path
'/lib/modules/3.10.0-993.el7.x86_64/kernel/drivers/net/ethernet/intel/i40e/i40e.ko.xz'
>>> "i40e" in modinfo_obj.retpoline_y
True
>>> "bnx2x" in modinfo_obj.retpoline_y
False
>>> "bnx2x" in modinfo_obj.retpoline_n
True
Raises

SkipComponent -- When content is empty.

retpoline_y

A set of names of the modules with the attribute “retpoline: Y”.

Type

set

retpoline_n

A set of names of the modules with the attribute “retpoline: N”.

Type

set

property data

Dict with the module name as the key and the module details as the value.

Type

(dict)

class insights.combiners.modinfo.ModulesInfo(filtered_modules_info)[source]

Bases: dict

Combiner to combine the result of KernelModulesInfo which supports filter and the parsers which only support one single module. It refers KernelModulesInfo first.

Examples

>>> type(modules_obj)
<class 'insights.combiners.modinfo.ModulesInfo'>
>>> 'i40e' in modules_obj
True
>>> 'bnx2x' in modules_obj.retpoline_y
False
Raises

SkipException -- When content is empty.

retpoline_y

A set of names of the modules with the attribute “retpoline: Y”.

Type

set

retpoline_n

A set of names of the modules with the attribute “retpoline: N”.

Type

set