50
  9   ˆl–ß=¿J*e¶¥8 ¸\ŠbÑ¿Áƒ�ka–Ým_J*j"Tâ€jà¸ÈTÅ£À 
6    a
    Ü““iˆ  ã                   @   s:   d dl mZmZmZmZmZmZ G dd„ deeeeƒZdS )é    )ÚPluginÚRedHatPluginÚUbuntuPluginÚSoSPredicateÚ	PluginOptÚ	CosPluginc                   @   sT   e Zd ZdZdZdZdZdZedddd	�ed
ddd	�gZ	dd„ Z
dd„ Zdd„ ZdS )ÚCRIOzCRI-O containersÚcrio)Ú	container)zcri-oú	cri-tools)r	   ÚallFz0collect for all containers, even terminated ones)ÚdefaultZdescÚlogsz)collect stdout/stderr logs for containersc                 C   s   |   g d¢¡ |  dg¡ | jddd� |  t| dgd�¡ g d¢}|  d	d
„ |D ƒ¡ d}|  d¡rp|› d�}d}d}|  |¡}|  |¡}|  |¡}|  ¡  |D ]:}| jd|› �dd� |  d¡r¢| jd|› �dddd� q¢|D ]}	| jd|	› �dd� qâ|D ]}
| jd|
› �dd� �q d S )N)z/etc/containersz/etc/crictl.yamlz/etc/crio/crio.confz/etc/crio/seccomp.jsonz/etc/crio/crio.conf.d/z!/etc/systemd/system/cri-o.servicez/etc/sysconfig/crio-*zcrio configz/etc/cniT)Ú	recursiver   )Úpackages)ÚinfoÚimagesÚpodsZpszps -azps -vaZstatsÚversionc                 S   s   g | ]}d |› �‘qS )zcrictl © )Ú.0Úsr   r   ú;/usr/lib/python3.9/site-packages/sos/report/plugins/crio.pyÚ
<listcomp>>   ó    zCRIO.setup.<locals>.<listcomp>zcrictl ps --quietr   z -azcrictl images --quietzcrictl pods --quietzcrictl inspect Ú
containers)Úsubdirr   zcrictl logs -t zcontainers/logséd   Zcrictl_logs)r   ÚpriorityÚtagszcrictl inspecti r   zcrictl inspectp r   )Úadd_copy_specZadd_cmd_outputZadd_dir_listingZset_cmd_predicater   Z
get_optionÚ_get_crio_listÚ_get_crio_goroutine_stacks)ÚselfZsubcmdsZps_cmdZimg_cmdZpod_cmdr   r   r   r
   ZimageZpodr   r   r   Úsetup   s<    
ÿ




ÿ
þz
CRIO.setupc                 C   sT   g }|   |¡}|d dkrP|d  ¡ D ]}| |¡ q&|rPd|d v rP| d¡ |S )NÚstatusr   ÚoutputZ
deprecated)Zexec_cmdÚ
splitlinesÚappendÚpop)r#   ÚcmdÚretÚresultZentr   r   r   r!   [   s    

zCRIO._get_crio_listc                 C   s   |   d¡r|  d¡ d S )Nz^/usr/bin/crio$z/tmp/crio-goroutine-stacks*.log)Zsignal_process_usr1r    )r#   r   r   r   r"   f   s    
zCRIO._get_crio_goroutine_stacksN)Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_nameZprofilesr   Zservicesr   Zoption_listr$   r!   r"   r   r   r   r   r      s   ÿÿý=r   N)Zsos.report.pluginsr   r   r   r   r   r   r   r   r   r   r   Ú<module>   s      "   ˆl–Ü4ý(© ~”ú�Á?q‘)‹FÿÃƒ­5¿Á 
¸    #!/usr/bin/sh
# Prints a package's identification PACKAGE VERSION or PACKAGE.
#
# Copyright (C) 2001-2003, 2005, 2014 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

want_version="$1"

# NLS nuisances: Letter ranges are different in the Estonian locale.
LC_ALL=C

while true; do
  if test -f configure; then
    package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ 	]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
    case "$package" in
      *[\"\$\`\{\}]*)
        # Some packages (gcal) retrieve the package name dynamically.
        package=
        ;;
    esac
    if test -n "$package"; then
      is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libto