SystemdAnalyzeBlame - command systemd-analyze blame
¶
This module parses the output of command systemd-analyze blame
.
-
class
insights.parsers.systemd_analyze.
SystemdAnalyzeBlame
(context, extra_bad_lines=None)[source]¶ Bases:
insights.core.CommandParser
,dict
Parse the output of
systemd-analyze blame
asdict
. The time to initialize is converted into seconds.Typical output:
33.080s cloud-init-local.service 32.423s unbound-anchor.service 2.773s kdump.service 1.699s dnf-makecache.service 1.304s cloud-init.service 1.073s initrd-switch-root.service 939ms cloud-config.service 872ms tuned.service 770ms cloud-final.service
Examples
>>> 'cloud-init-local.service' in output True >>> output.get('cloud-init.service', 0) 1.304
Returns: - With unit-name & time as key-value pair.
- Ex:
{'cloud-config.service': 0.939, 'cloud-final.service': 0.77, 'cloud-init-local.service': 33.08, 'cloud-init.service': 1.304, 'dnf-makecache.service': 1.699, 'initrd-switch-root.service': 1.073, 'kdump.service': 2.773, 'tuned.service': 0.872, 'unbound-anchor.service': 32.423}
Return type: (dict) Raises: SkipComponent
-- If content is not provided.