Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/coredump.cpython-312.pyc |
�
-�_g� � �@ � d dl Z d dlZd dlmZmZmZ G d� dee� Zy)� N)�Plugin�IndependentPlugin� PluginOptc �R � e Zd ZdZdZdZdZdZ eddd� � ed
dd� � gZ d
� Z
y)�Coredumpaa
This plugin collects from the systemd-coredump service, which is leveraged
via the coredumpctl command.
Beyond basic configuration of the service, the plugin will also attempt to
collect information on available coredumps. For any coredumps reported by
coredumpctl for which the core is present, this plugin will collect that
coredump file. The number of dump files collects is controlled by the
`dumps` option, defaulting to 3. Note that core collection is performed
based on the most recent cores generated. The summary information provided
by `coredumpctl info` is also collected.
The coredump files will be at their canonical location in the sos archive,
usually under var/lib/systemd/coredump. Symlinks are dropped in the plugin
directory to assist in identifying which coredump aligns to which entry in
the provided `coredumpctl list` output collection.
Users may leverage the `executable` option to control which coredumps the
plugin will collect. This option takes a case-insensitive python regex
string. If provided, only coredump entries for which the EXE field in
`coredumpctl list` output matches will be collected.
The dump files collected are compressed, and users should be aware that
when inflated these files can be orders of magnitude larger than their
collected sizes.
z3systemd-coredump related information and dump files�coredump)�system�debug)zsystemd-udevzsystemd-coredump�dumps� znumber of dump files to collect)�default�desc�
executable� zEonly collect info and dump output for executables matching this regexc �� � | j g d�� | j d� }|d dk7 ry d}|d j � dd D �]� }|j � }|d }|d }| j d � x}r&t j ||t
j � s�W| j d
|� �� }|d dk7 r�t|d } || j d� k s��t j d| t
j � }
|
j � d j � }t j |� j d
kD r| j d|� d�� ��| j |dd�� | j | j d | j# � d|� d| j% |� � �� }t j&