File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/process.cpython-39.opt-1.pyc
a
^��c{ � @ s: d dl Z d dlZd dlmZmZmZ G dd� dee�ZdS )� N)�Plugin�IndependentPlugin� PluginOptc
@ sl e Zd ZdZdZdZedddd�edd d
d�edd dd�ed
dedd�eddedd�gZdd� Z dd� Z
dS )�Processzprocess informationZprocess)�system�lsofTzcollect info on all open files)�default�desc�lsof-threadsFz,collect threads' open file info if supported�smapszcollect /proc/*/smaps files�samples� z"number of iotop samples to collect)r Zval_typer �numprocsi z*number of process to collect /proc data ofc C sZ d}d}d}|d7 }| � ddg� dd� | �d �D �}| �d
�rR|d | �d
�� }|D ],}| � d| d| d
| d| d| g� qV| �d�r�| � d� | jddg d�dd� | jddd� | �d�r�| jdddddd� | �d�r�| jd ddd!� | jd"d#gd$d%� | �d&||f d&||f g� | �d'��rH| jd(| �d'� d)d*� | �d+d,g� d S )-Nzps axoz3pid,ppid,user,group,lwp,nlwp,start_time,comm,cgroupz2flags,state,uid,pid,ppid,pgid,sid,cls,pri,addr,sz,zwchan:20,lstart,tty,time,cmdz/proc/sched_debugz
/proc/statc S s g | ]}t �d |�r|�qS )z[0-9])�re�match)�.0�p� r �>/usr/lib/python3.9/site-packages/sos/report/plugins/process.py�
<listcomp>- � z!Process.setup.<locals>.<listcomp>z/procr z/proc/%s/statusz/proc/%s/cpusetz/proc/%s/oom_*z/proc/%s/stackz/proc/%s/limitsr z/proc/[0-9]*/smapsz
ps auxwwwmZps)Zps_auxZps_auxwwZ ps_auxwwwZ
ps_auxwwwmZ ps_auxcww� )�root_symlink�tags�priorityz
pstree -lpZpstree)r r zlsof +M -n -l -c ''� �2 )r �timeoutr r r
z
lsof +M -n -l)r r z ps alxwwwzps -elfLT)Z
cmd_as_tagz%s %sr ziotop -b -o -d 0.5 -t -n %s�d )r z#pidstat -p ALL -rudvwsRU --human -hzpidstat -tl)Z
add_copy_spec�listdirZ
get_optionZadd_cmd_output)�selfZps_axoZ
ps_group_optsZ
ps_sched_optsZprocs�procr r r �setup! sh �
�
�
�
��
����z
Process.setupc C s | � d���}| jjjs0|�d� W d � d S | �d�}i }i }|d dksr|�d|d � �� W d � d S |d �� D ]X}|�� �� }|d }|d }| � |�s�q~||vr�| jj�
|�||<