+
    i  c                   sB    ^ RI t ^ RIt^ RIHtHtHt  ! R R]]4      tR# )i    N)PluginIndependentPlugin	PluginOptc                   sf   a  ] tR t^t o RtRtRtRtRt]	! R^RR7      ]	! RRR	R7      .t
R
 tRtV tR# )Coredumpa  
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 filesZcoredumpdumpsznumber of dump files to collect)ZdefaultZdesc
executable zEonly collect info and dump output for executables matching this regexc                sz   V P                  . RO4       V P                  R4      pVR,          ^ 8w  d   R# ^ pVR,          P                  4       R,           EF"  pVP                  4       pV^,          pVR,          pV P	                  R4      ;p'       d.   \
        P                  ! Wv\
        P                  4      '       g   Kl  V P                  RV 24      pVR,          ^ 8w  d   K  VR,          p	W P	                  R4      8  g   K  \
        P                  ! R	V	\
        P                  4      p
 V
P                  4       ^,          P                  4       p\        P                  ! V4      P                  R
8  d   V P                  RV R24       EK9  V P                  VR^R7       V P                  V P                   R,          V P#                  4       RV RV P%                  V4       24      p\        P&                  P)                  V P*                  P-                  4       V4      p\        P&                  P/                  W4      pVP1                  RR^4      pV P*                  P3                  W4       V^,          pEK%  	  R#   \4         d     EK8  \6         d$   pT P                  RT RT 24        Rp?EK`  Rp?ii ; i)/etc/systemd/coredump.confzcoredumpctl list --reverseZstatusNZoutput:i   NNr   zcoredumpctl info r   z(^\s*Storage:(.*)(\(present\)))i  zSkipping core dump file z due to sizeF)ZtailitZ	sizelimitZcmddirZ	coredump_Z_z../r   zCould not collect coredump for z : )r   z/etc/systemd/coredump.conf.d/z/run/systemd/coredump.conf.d/z!/usr/lib/systemd/coredump.conf.d/z!/usr/lib/systemd/systemd-coredumpi)Zadd_copy_specZcollect_cmd_outputZ
splitlinesZsplitZ
get_optionreZsearchZIZMZgroupsZstriposZstatZst_sizeZ	_log_infoZ	path_joinZcommonsZnameZ_mangle_commandZpathZjoinZarchiveZget_archive_pathZrelpathZreplaceZadd_linkZAttributeErrorZ	Exception)ZselfZcoredump_listZcores_collectedZlineZcdumpZpidZexeZregexZcinfoZresZcoreZ	core_pathZplugpathZarcpathZlinkpathZerrs   &               @/usr/lib/python3.14/site-packages/sos/report/plugins/coredump.pysetupZCoredump.setup9   sL    
 	 //0LM"a'!(+668<<DJJLE(C)C55u5yyRTT22++.?u,EFEX!#/C!99yy!CS"$$O  $a 0 6 6 8I wwy)11I=6ykN !&&y#&N#~~X.		#C5$*>*>s*C)DE H !ggll4<<+H+H+J+46G!wwwAH'//r1=HLL))(=#q(OM =N &   NN9#c#G s,   ,AI>C)I>>J:J:J:J55J: N)ZsystemZdebug)zsystemd-udevzsystemd-coredump)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__Z
short_descZplugin_nameZprofilesZpackagesr   Zoption_listr   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r
   r   r      sR     6 GJK"H3H 	'1+LM,.	0K; ;    r   )r	   r   Zsos.report.pluginsr    r   r   r   r   r   r
   <module>r      s$    
 	 C Cdv( dr   