관리-도구
편집 파일: _psbsd.cpython-36.opt-1.pyc
3 ��JZ$v � @ sl d Z ddlZddlZddlZddlZddljjZddl m Z ddlmZ ddl mZ ddl mZ ddl mZ dd l mZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z! ddl m"Z" ddl m#Z# g Z$e�rhej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1ej2iZ3n�e�ste�r�ej%ej&ej)ej*ej+ej,ej4ej.ej-ej.ej'ej5ej6ej(iZ3nBe�r�ej%ej&ej7ej(ej8ej.ej+ej,ej-ej.ej4ej9ej:ej;iZ3ej<ej=ej>ej?ej@ejAejBejCejDejEejFejGejHejIejJejKejLejMejNejOejPejQejRejSiZTe�rjejUd�ZVn ejUd�ZVejWZWeXddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1�ZYe d2d3d4d5d6d7d8d9d:d;d<d=g�ZZe d>d?d@dAdBdCg�Z[e dDdEdFdGdHdIg�Z\e\Z]e dJd?dAdKdLg�Z^e dMdN�Z_e dOdP�Z`e�rFe dQdRdSdTdUdVdWdXg�Zane dQdRdSdTdUg�ZadYdZ� Zbd[d\� Zcd]d^� Zdeeed_��r�d`d_� Zfndad_� Zfdbef_gdcdd� Zhe�s�e�r�dedf� Zindgdf� Zidhdi� Zjd�djdk�ZkejlZlejmZmejnZnejoZodldm� Zpdndo� Zqe�rdpdq� Zrdrds� Zsdtdu� Ztedvdw� �Zudxdy� Zve�s2e�r<dzd{� ZwnejwZwd|d}� Zxejyd~d� �ZzG d�d�� d�e{�Z|dS )�z5FreeBSD, OpenBSD and NetBSD platforms implementation.� N)� namedtuple)�AF_INET� )�_common)�_psposix)�_psutil_bsd)� _psutil_posix)�AF_INET6)� conn_tmap)�FREEBSD)�memoize)�memoize_when_activated)�NETBSD)�OPENBSD)�sockfam_to_enum)�socktype_to_enum)� usage_percent)�which)�AccessDenied)� NoSuchProcess)� ZombieProcess�SC_PAGESIZE�SC_PAGE_SIZE� � � � � � � � � � � � � � � � � � � � � � � )�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�pmemrB rC �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�sdiskioZ read_countZwrite_countZ read_bytesZwrite_bytesZ read_timeZ write_timeZ busy_timec C s� t j� } | \}}}}}}}}tr�tdd��R} xJ| D ]B} | jd�rVt| j� d �d }q2| jd�r2t| j� 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 rI )ZmemrJ rM rN rO rS rQ rP rR �f�lineZavailrL rK � rm �/usr/lib64/python3.6/_psbsd.py�virtual_memory� s "ro c C s4 t j� \} }}}}t|| dd�}tj| |||||�S )z@System swap memory as (total, used, free, sin, sout) namedtuple.r )re )rf Zswap_memr r Zsswap)rJ rL rM ZsinZsoutrK rm rm rn �swap_memory� s rp c C s"