Your IP : 3.138.126.79
B
�=�_]y � @ s� d Z ddlZddlZddlZddlZddlm mZ ddl m
Z
ddl mZ ddlm
Z
ddlmZ ddlmZ dd lmZ dd
l
mZ ddl
mZ ddl
mZ dd
l
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" g Z#e�rzej$e
j%ej&e
j'ej(e
j)ej*e
j+ej,e
j-ej.e
j/ej0e
j1iZ2n~e�r�ej$e
j%ej(e
j)ej*e
j+ej3e
j-ej,e
j-ej&e
j4ej5e
j'iZ2n:e�r�ej$e
j%ej(e
j)ej*e
j+ej,e
j-ej&e
j4ej5e
j'iZ2ej6e
j7ej8e
j9ej:e
j;ej<e
j=ej>e
j?ej@e
jAejBe
jCejDe
jEejFe
jGejHe
jIejJe
jKejLe
jMiZNe�O� ZPejQZQeRed�ZSeRed�ZTeRed�ZUeRed�ZVeWdddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4�ZXe
d5d6d7d8d9d:d;d<d=d>d?d@g�ZYe
dAdBdCdDdEdFg�ZZe
dGdHdIdJdKdLg�Z[e[Z\e
dMdBdDdNdOg�Z]e
dPdQ�Z^e
dRdS�Z_e�r^e
dTdUdVdWdXdYdZd[g�Z`ne
dTdUdVdWdXg�Z`d\d]� Zad^d_� Zbd`da� ZceS�r�dbd� Zdndcd� Zddded_ededf� Zfe�s�e�r�dgdh� Zgndidh� Zgdjdk� Zhd�dldm�ZiejjZjejkZkejlZlejmZmdndo� Zndpdq� Zoe�r$drds� Zpdtdu� Zqdvdw� Zrdxdy� Zsdzd{� Zted|d}� �Zud~d� Zve�sTe�r^d�d�� ZwnejwZwd�d�� Zxd�d�� Zyejzd�d�� �Z{G d�d�� d�e|�Z}dS )�z5FreeBSD, OpenBSD and NetBSD platforms implementation.� N)�
namedtuple)�defaultdict� )�_common)�_psposix)�_psutil_bsd)�
_psutil_posix)�AccessDenied)� conn_tmap)�conn_to_ntuple)�FREEBSD)�memoize)�memoize_when_activated)�NETBSD)�
NoSuchProcess)�OPENBSD)�
usage_percent)�
ZombieProcess)�FileNotFoundError)�PermissionError)�ProcessLookupError)�which�
per_cpu_times�proc_num_threads�proc_open_files�proc_num_fds� � � � � � � � �
� � �
� � � � � � � � � � � )�ppid�status�real_uid�
effective_uid� saved_uid�real_gid�
effective_gid� saved_gid�ttynr�create_time�ctx_switches_vol�ctx_switches_unvol�
read_io_count�write_io_count� user_time�sys_time�ch_user_time�ch_sys_time�rss�vms�memtext�memdata�memstack�cpunum�name�svmem�totalZ available�percent�used�free�active�inactive�buffers�cached�shared�wired� scputimes�user�nice�system�idle�irq�pmemrE rF �text�data�stack� pcputimes�
children_user�children_system�
pmmap_groupedz*path rss, private, ref_count, shadow_count� pmmap_extz6addr, perms path rss, private, ref_count, shadow_count�sdiskio�
read_count�write_count�
read_bytes�write_bytes� read_time�
write_timeZ busy_timec C s� t �� } | \}}}}}}}}tr�tdd��R} xJ| D ]B}
|
�d�rVt|
�� d �d }q2|
�d�r2t|
�� d �d }q2W W dQ R X || | }|| | }t|| |dd�}
t|||
||||||||�S ) z&System virtual memory as a namedtuple.z
/proc/meminfo�rbs Buffers:r i s
MemShared:N)�round_) �cextZvirtual_memr �open�
startswith�int�splitr rL )ZmemrM rP rQ rR rV rT rS rU �f�lineZavailrO rN � rv �@/opt/alt/python37/lib64/python3.7/site-packages/psutil/_psbsd.py�virtual_memory� s
"rx c C s4 t �� \} }}}}t|| dd�}t�| |||||�S )z@System swap memory as (total, used, free, sin, sout) namedtuple.r )rn )ro Zswap_memr r �sswap)rM rO rP �sin�soutrN rv rv rw �swap_memory� s r| c C s"