Viewing File: /opt/alt/python38/lib64/python3.8/site-packages/psutil/__pycache__/_psbsd.cpython-38.opt-1.pyc
U
=_]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#erzej$e
j%ej&e
j'ej(e
j)ej*e
j+ej,e
j-ej.e
j/ej0e
j1iZ2n~erej$e
j%ej(e
j)ej*e
j+ej3e
j-ej,e
j-ej&e
j4ej5e
j'iZ2n:erej$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
jMiZNeO ZPejQZQeRedZSeRedZTeRedZUeRedZVeWdddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4ZXe
d5d6d7d8d9d:d;d<d=d>d?d@gZYe
dAdBdCdDdEdFgZZe
dGdHdIdJdKdLgZ[e[Z\e
dMdBdDdNdOgZ]e
dPdQZ^e
dRdSZ_er^e
dTdUdVdWdXdYdZd[gZ`ne
dTdUdVdWdXgZ`d\d] Zad^d_ Zbd`da ZceSrdbd Zdndcd Zddded_ededf Zfeserdgdh Zgndidh Zgdjdk ZhddldmZiejjZjejkZkejlZlejmZmdndo Zndpdq Zoer$drds Zpdtdu Zqdvdw Zrdxdy Zsdzd{ Zted|d} Zud~d ZvesTer^dd ZwnejwZwdd Zxdd Zyejzdd Z{G dd de|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_timesproc_num_threadsproc_open_filesproc_num_fds
)ppidstatusreal_uid
effective_uid saved_uidreal_gid
effective_gid saved_gidttynrcreate_timectx_switches_volctx_switches_unvol
read_io_countwrite_io_count user_timesys_timech_user_timech_sys_timerssvmsmemtextmemdatamemstackcpunumnamesvmemtotalZ availablepercentusedfreeactiveinactivebufferscachedsharedwired scputimesusernicesystemidleirqpmemrE rF textdatastack pcputimes
children_userchildren_system
pmmap_grouped*path rss, private, ref_count, shadow_count pmmap_ext6addr, perms path rss, private, ref_count, shadow_countsdiskioZ
read_countZwrite_countZ
read_bytesZwrite_bytesZ read_timeZ
write_timeZ busy_timec C s t } | \}}}}}}}}tr~tddN} | D ]B}
|
drTt|
d d }q0|
dr0t|
d d }q0W 5 Q R X || | }|| | }t|| |dd}
t|||
||||||||S )z&System virtual memory as a namedtuple.z
/proc/meminforbs Buffers:r i s
MemShared:Zround_) cextZvirtual_memr open
startswithintsplitr rL )ZmemrM rP rQ rR rV rT rS rU flineZavailrO rN rr @/opt/alt/python38/lib64/python3.8/site-packages/psutil/_psbsd.pyvirtual_memory s(
rt c C s4 t \} }}}}t|| dd}t| |||||S )z@System swap memory as (total, used, free, sin, sout) namedtuple.r rj )rk Zswap_memr r Zsswap)rM rO rP ZsinZsoutrN rr rr rs swap_memory s ru c C s"