Viewing File: /opt/alt/python38/lib64/python3.8/site-packages/psutil/__pycache__/_psosx.cpython-38.opt-1.pyc
U
=_VD @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddlm
Z ddlmZ
dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ g Ze
Ze
jZejejej ej!ej"ej#ej$ej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1ej2ej3ej4ej5iZ6ej7ej8ej9ej:ej;ej<ej=ej>ej?ej@iZAeBddddddddddddZCeBdddddddddZDedd d!d"d#gZEed$d%d&d'd(d)d*d+d,gZFed-d.d/d0d1gZGed2eGjHd3 ZId4d5 ZJd6d7 ZKd8d9 ZLd:d; ZMd<d= ZNd>d? ZOd@dA ZPdBdC ZQe jRZRejSZSd\dEdFZTdGdH ZUejVZVe
jWZWd]dJdKZXdLdM ZYdNdO ZZdPdQ Z[dRdS Z\e j]Z]dTdU Z^dVdW Z_ej`dXdY ZaG dZd[ d[ebZcdS )^zmacOS platform implementation. N)
namedtuple )_common)_psposix)_psutil_osx)
_psutil_posix)AccessDenied) conn_tmap)conn_to_ntuple)
isfile_strict)memoize_when_activated)
NoSuchProcess)parse_environ_block)
usage_percent)
ZombieProcess)PermissionError)ProcessLookupError
)ppidruideuidsuidrgidegidsgidttynrctimestatusname)cpuutimecpustimerssvmspfaultspageins
numthreadsvolctxsw scputimesusernicesystemidlesvmemtotalZ availablepercentusedfreeactiveinactivewiredpmemr) r* r+ r, pfullmem)ussc C sT t \} }}}}}|| }|| }||8 }t| | | dd}t| |||||||S )z&System virtual memory as a namedtuple.r Zround_)cextZvirtual_memr r4 ) r5 r9 r: r; r8 ZspeculativeZavailr7 r6 rA @/opt/alt/python38/lib64/python3.8/site-packages/psutil/_psosx.pyvirtual_memoryp s rC c C s4 t \} }}}}t|| dd}t| |||||S )z=Swap system memory as a (total, used, free, sin, sout) tuple.r r? )r@ Zswap_memr r Zsswap)r5 r7 r8 ZsinZsoutr6 rA rA rB swap_memory s rD c C s t \} }}}t| |||S )z(Return system CPU times as a namedtuple.)r@ cpu_timesr/ )r0 r1 r2 r3 rA rA rB rE s rE c C s: g } t D ](}|\}}}}t||||}| | q| S )z(Return system CPU times as a named tuple)r@
per_cpu_timesr/ append)retZcpu_tr0 r1 r2 r3 itemrA rA rB rF s rF c C s t S )z0Return the number of logical CPUs in the system.)r@ cpu_count_logicalrA rA rA rB rJ s rJ c C s t S )z1Return the number of physical CPUs in the system.)r@ Zcpu_count_physrA rA rA rB cpu_count_physical s rK c C s"