관리-도구
편집 파일: _psbsd.cpython-39.opt-1.pyc
a M�_]y � @ sf 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 d5g d6��ZYe d7g d8��ZZe d9g d:��Z[e[Z\e d;g d<��Z]e d=d>�Z^e d?d@�Z_e�r2e dAg dB��Z`ne dAg dC��Z`dDdE� ZadFdG� ZbdHdI� ZceS�rhdJd� ZdndKd� ZddLed_edMdN� Zfe�s�e�r�dOdP� ZgndQdP� ZgdRdS� ZhdrdTdU�ZiejjZjejkZkejlZlejmZmdVdW� ZndXdY� Zoe�r�dZd[� Zpd\d]� Zqd^d_� Zrd`da� Zsdbdc� Zteddde� �Zudfdg� Zve�s$e�r.dhdi� ZwnejwZwdjdk� Zxdldm� Zyejzdndo� �Z{G dpdq� dqe|�Z}dS )sz5FreeBSD, 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�pmem)rE rF �text�data�stack� pcputimes)rY r[ � children_user�children_system� pmmap_grouped�*path rss, private, ref_count, shadow_count� pmmap_ext�6addr, perms path rss, private, ref_count, shadow_count�sdiskio)� read_count�write_count� read_bytes�write_bytesZ read_timeZ write_timeZ busy_time)rj rk rl rm c C s� t �� } | \}}}}}}}}tr�tdd��X} | D ]B} | �d�rTt| �� d �d }q0| �d�r0t| �� d �d }q0W d � n1 s�0 Y || | }|| | }t|| |dd�} t||| ||||||||�S ) z&System virtual memory as a namedtuple.z /proc/meminfo�rbs Buffers:r i s MemShared:N�Zround_) �cextZvirtual_memr �open� startswith�int�splitr rL )ZmemrM rP rQ rR rV rT rS rU �f�lineZavailrO rN � rw �3/usr/lib64/python3.9/site-packages/psutil/_psbsd.py�virtual_memory� s 4�ry c C s4 t �� \} }}}}t|| dd�}t�| |||||�S )z@System swap memory as (total, used, free, sin, sout) namedtuple.r ro )rp Zswap_memr r Zsswap)rM rO rP ZsinZsoutrN rw rw rx �swap_memory� s rz c C s"