HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/psutil/__pycache__/_pswindows.cpython-310.pyc
o

;j*��@sHdZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddl	mZddl
m
Z
ddl
mZddl
mZdd	l
mZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddlmZddlmZddlmZddlmZddlmZddlmZzddl	mZ Wn-e!y�Z"z!e#e"��$��%d�r�e�&�ddkr�dZ'e'd7Z'e'd7Z'e(e'�e"��dZ"["wwgd�Z)dZ*d Z+d!ej,vZ-e�.d"d#d$i�Z/e/j0Z0e j1e
j2e j3e
j4e j5e
j6e j7e
j8e j9e
j:e j;e
j<e j=e
j>e j?e
j@e jAe
jBe jCe
jDe jEe
jFe jGe*e jHe
jIi
ZJGd%d&�d&ej.�ZKeL��MeKjN�Gd'd(�d(ej.�ZOeL��MeOjN�ePd�id)d�d*d�d+d,�d-d.�d/d0�d1d2�d3d�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ��ZQejRdRdS�dTdU��ZSedVdW��ZTdXdY�ZUdZd[�ZVe jWZWe jXZXe jYZYd\d]�ZZd^d_�Z[d`da�Z\dbdc�Z]ddde�Z^dfdg�Z_dhdi�Z`djdk�Zadlabe�c�Zddmdn�Zedodp�Zfd�dqdr�Zgdsdt�Zhdudv�Zidwdx�Zjdydz�Zkdald{d|�Zmd}d~�Zndd��Zod�d��ZpGd�d��d��Zqe jrZre jsZse jtZtd�d��Zud�d�d��Zvd�d��Zwd�d��ZxGd�d��d��ZydS)�z Windows platform implementation.�N�)�_common)�_ntuples)�ENCODING)�AccessDenied)�
NoSuchProcess)�TimeoutExpired)�	conn_tmap)�conn_to_ntuple)�debug)�
isfile_strict)�memoize)�memoize_when_activated)�parse_environ_block)�
usage_percent)�ABOVE_NORMAL_PRIORITY_CLASS)�BELOW_NORMAL_PRIORITY_CLASS)�HIGH_PRIORITY_CLASS)�IDLE_PRIORITY_CLASS)�NORMAL_PRIORITY_CLASS)�REALTIME_PRIORITY_CLASS)�_psutil_windowszdll load failed�z3this Windows version is too old (< Windows Vista); z:psutil 3.4.2 is the latest version which supports Windows z2000, XP and 2003 server)�win_service_iter�win_service_getrrrrrr�IOPRIO_VERYLOW�
IOPRIO_LOW�
IOPRIO_NORMAL�IOPRIO_HIGH�CONN_DELETE_TCB�AF_LINKZ
DELETE_TCBi+Z__pypy__�
AddressFamilyr ���c@s$eZdZeZeZeZeZeZeZdS)�PriorityN)	�__name__�
__module__�__qualname__rrrrrr�r'r'�E/opt/saltstack/salt/lib/python3.10/site-packages/psutil/_pswindows.pyr#esr#c@seZdZdZdZdZdZdS)�
IOPriorityrr��N)r$r%r&rrrrr'r'r'r(r)qs
r)�num_handles�ctx_switches�	user_timer*�kernel_timer+�create_time��num_threads��	io_rcount�	io_wcount��	io_rbytes��	io_wbytes�	�io_count_others�
�io_bytes_others��num_page_faults��	peak_wset�
�wset��peak_paged_pool��
paged_pool��peak_non_paged_pool��non_paged_pool��pagefile��
peak_pagefile��mem_private�i)�maxsizecCs�|�d�r|Sd�|�d�dd��}|dvr2d�|�d�dd��}dd�|�d�dd��}n|�d�r?|�d�d}nt�|�}|t|�d�}tj�||�S)	z�Convert paths using native DOS format like:
        "\Device\HarddiskVolume1\Windows\systemew\file.txt" or
        "\??\C:\Windows\systemew\file.txt"
    into:
        "C:\Windows\systemew\file.txt".
    z\\�\Nr+>z\Device\Mupz\??\UNCr3z\??\r*)�
startswith�join�split�cextZQueryDosDevice�len�os�path)�sZrawdriveZdriveletter�	remainderr'r'r(�convert_dos_path�s


r^cC�t��S�N)rX�getpagesizer'r'r'r(ra��rac
CsLt��}|\}}}}|}|}|}||}t|||dd�}	t�|||	||�S)z&System virtual memory as a namedtuple.r�Zround_)rX�virtual_memr�ntpZsvmem)
�memZtotphysZ	availphysZ_totsysZ	_availsys�totalZavail�free�used�percentr'r'r(�virtual_memory�srkcCspt��}|d}|d}||}|dkr!t��}td||�}nd}d}||}t|d�}t�||||dd�S)z=Swap system memory as a (total, used, free, sin, sout) tuple.rr*g{�G�z�?�r)rXrdZswap_percent�int�roundreZsswap)rfZ
total_physZtotal_systemrgZpercentswaprirhrjr'r'r(�swap_memory�s
rocCsFt|t�r|jtdd�}t�|�\}}}t||dd�}t�||||�S)z'Return disk usage associated with path.�strict)�errorsrrc)	�
isinstance�bytes�decoderrX�
disk_usagerreZ
sdiskusage)r[rgrirhrjr'r'r(ru�s

rucCst�|�}dd�|D�S)zReturn disk partitions.cSsg|]}tj|��qSr')reZ	sdiskpart)�.0�xr'r'r(�
<listcomp>�sz#disk_partitions.<locals>.<listcomp>)rX�disk_partitions)�all�rawlistr'r'r(ry�s
rycCs@t��\}}}tjdd�tt���D��}t�||||j|j�S)z)Return system CPU times as a named tuple.cSsg|]}t|��qSr')�sum)rv�nr'r'r(rx	szcpu_times.<locals>.<listcomp>)rX�	cpu_timesre�	scputimes�zip�
per_cpu_times�	interrupt�dpc)�user�system�idleZ
percpu_summedr'r'r(r~s��r~cCs<g}t��D]\}}}}}t�|||||�}|�|�q|S)z6Return system per-CPU times as a list of named tuples.)rXr�rer�append)�retr�r�r�r�r��itemr'r'r(r�s
r�cCr_)z0Return the number of logical CPUs in the system.)rX�cpu_count_logicalr'r'r'r(r�rbr�cCr_)z-Return the number of CPU cores in the system.)rX�cpu_count_coresr'r'r'r(r�rbr�cCs$t��\}}}}d}t�||||�S)zReturn CPU statistics.r)rX�	cpu_statsreZ	scpustats)r-Z
interruptsZ_dpcsZsyscallsZsoft_interruptsr'r'r(r�#sr�cCs(t��\}}d}t�t|�|t|��gS)zMReturn CPU frequency.
    On Windows per-cpu frequency is not supported.
    rl)rX�cpu_freqreZscpufreq�float)�currZmax_Zmin_r'r'r(r�*sr�FcCst��}tdd�|D��S)Ncss�|]}t|d�VqdS)r*N)rn)rv�loadr'r'r(�	<genexpr>:s�z#_getloadavg_impl.<locals>.<genexpr>)rX�
getloadavg�tuple)Z	raw_loadsr'r'r(�_getloadavg_impl7sr�cCsZtrt�St�tst��daWd�t�SWd�t�S1s%wYt�S)z�Return the number of processes in the system run queue averaged
    over the last 1, 5, and 15 minutes respectively as a tuple.
    TN)�_loadavg_initializedr��_lockrXZinit_loadavg_counterr'r'r'r(r�=s
��
��r�cCsrt|\}}t�|||�}t�}|D]"}|\}}}	}
}}}
t|||	|
||t|dkr+|
ndd�}|�|�qt|�S)z�Return socket connections.  If pid == -1 return system-wide
    connections (as opposed to connections opened by one process only).
    r"N)�pid)r	rX�net_connections�setr
�TCP_STATUSES�add�list)�kind�_pidZfamilies�typesr{r�r��fdZfam�type�laddr�raddr�statusr��ntr'r'r(r�Ss"�
r�cCsXi}t��}|��D]\}}|\}}}}ttd�rt�|�}t�||||d�||<q
|S)z)Get NIC stats (isup, duplex, speed, mtu).�	NicDuplex�)rX�net_if_stats�items�hasattrrr�reZ	snicstats)r�Zrawdict�namer�ZisupZduplexZspeedZmtur'r'r(r�js

r�cCr_)zsReturn network I/O statistics for every network interface
    installed on the system as a dict of raw tuples.
    )rX�net_io_countersr'r'r'r(r�vsr�cCr_)z,Return the addresses associated to each NIC.)rX�net_if_addrsr'r'r'r(r�}rbr�cCsdt��\}}}}|dk}t|d@�}t|d@�}|rdS|s |r$tj}n|dkr+tj}t�|||�S)zReturn battery information.r�r8Nr")rX�sensors_battery�boolrZPOWER_TIME_UNLIMITEDZPOWER_TIME_UNKNOWNreZsbattery)Z
acline_status�flagsrjZsecsleftZ
power_pluggedZ
no_batteryZchargingr'r'r(r��sr�cCs,t��t��}t|t�dkrtS|a|S)z�The system boot time expressed in seconds since the epoch. This
    also includes the time spent during hybernate / suspend.
    r)�timerXZuptime�abs�_last_btime)r�r'r'r(�	boot_time�s
r�cCs@g}t��}|D]}|\}}}t�|d||d�}|�|�q|S)z:Return currently connected users as a list of namedtuples.N)rX�usersreZsuserr�)�retlistr{r�r��hostnameZtstampr�r'r'r(r��s
r�ccs$�t��D]
\}}t||�VqdS)z*Yields a list of WindowsService instances.N)rXZwinservice_enumerate�WindowsService)r��display_namer'r'r(r�s��rcCst|d�}|��d|_|S)zBOpen a Windows service and return it as a WindowsService instance.Nr�)r��
_query_config�
_display_name)r�Zservicer'r'r(r�s
rc@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ejdd��Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$S)%r�z(Represents an installed Windows service.cCs||_||_dSr`)�_namer�)�selfr�r�r'r'r(�__init__�s
zWindowsService.__init__cCs&d|j�d|j�d�}|jj�|��S)Nz(name=z, display_name=�))r�r��	__class__r$)r��detailsr'r'r(�__str__�szWindowsService.__str__cCsd|���dt|��d�S)N�<z at �>)r��id�r�r'r'r(�__repr__�szWindowsService.__repr__cCst|t�stS|j|jkSr`)rrr��NotImplementedr��r��otherr'r'r(�__eq__�s
zWindowsService.__eq__cCs
||kSr`r'r�r'r'r(�__ne__�s
zWindowsService.__ne__cCsL|���t�|j�\}}}}Wd�n1swYt||||d�S)N)r��binpath�username�
start_type)�_wrap_exceptionsrXZwinservice_query_configr��dict)r�r�r�r�r�r'r'r(r��s

���zWindowsService._query_configcCsP|���t�|j�\}}Wd�n1swY|dkr"d}t||d�S)Nr)r�r�)r�rXZwinservice_query_statusr�r�)r�r�r�r'r'r(�
_query_status�s
�zWindowsService._query_statusc
cs��zdVWdSty@}z-|j}t|�r$d|�d�}td||d�|�|jtjtjhvr;d|�d�}td||d�|��d}~ww)z{Ctx manager which translates bare OSError and WindowsError
        exceptions into NoSuchProcess and AccessDenied.
        Nzservice z( is not querable (not enough privileges)�r�r��msgz does not exist)	�OSErrorr��is_permission_errr�winerrorrXZERROR_INVALID_NAMEZERROR_SERVICE_DOES_NOT_EXISTr)r��errr�r�r'r'r(r��s$�
����zWindowsService._wrap_exceptionscC�|jS)z�The service name. This string is how a service is referenced
        and can be passed to win_service_get() to get a new
        WindowsService instance.
        )r�r�r'r'r(r�szWindowsService.namecCr�)z_The service display name. The value is cached when this class
        is instantiated.
        )r�r�r'r'r(r�szWindowsService.display_namecC�|��dS)zwThe fully qualified path to the service binary/exe file as
        a string, including command line arguments.
        r��r�r�r'r'r(r�"�zWindowsService.binpathcCr�)z,The name of the user that owns this service.r�r�r�r'r'r(r�(�zWindowsService.usernamecCr�)zRA string which can either be "automatic", "manual" or
        "disabled".
        r�r�r�r'r'r(r�,r�zWindowsService.start_typecCr�)zzThe process PID, if any, else None. This can be passed
        to Process class to control the service's process.
        r��r�r�r'r'r(r�4r�zWindowsService.pidcCr�)zService status as a string.r�r�r�r'r'r(r�:r�zWindowsService.statuscCst�|���S)zService long description.)rXZwinservice_query_descrr�r�r'r'r(�description>�zWindowsService.descriptioncCs>|��}|�|���|��|d<|��|d<|��|d<|S)zUUtility method retrieving all the information above as a
        dictionary.
        r�r�r�)r��updater�r�r�r�)r��dr'r'r(�as_dictDszWindowsService.as_dictN)r$r%r&�__doc__r�r�r�r�r�r�r��
contextlib�contextmanagerr�r�r�r�r�r�r�r�r�r�r'r'r'r(r��s(

r�cCs.t|t�s	J|��t|t�p|jtjtjhvS)z*Return True if this is a permission error.)rrr��PermissionErrorr�rXZERROR_ACCESS_DENIEDZERROR_PRIVILEGE_NOT_HELD)�excr'r'r(r��s
�r�cCs@t|t�s	J|��t|�rt||d�St|t�rt||d�S|�)z3Convert OSError into NoSuchProcess or AccessDenied.�r�r�)rrr�r�r�ProcessLookupErrorr)r�r�r�r'r'r(�convert_oserror�s
r�c�t����fdd��}|S)zDDecorator which converts OSError into NoSuchProcess or AccessDenied.c
sFz�|g|�Ri|��WSty"}z
t||j|jd�|�d}~ww)Nr�)r�r�r�r�)r��args�kwargsr���funr'r(�wrapper�s��z wrap_exceptions.<locals>.wrapper��	functools�wraps�r�r�r'r�r(�wrap_exceptions�sr�cr�)z�Workaround for https://github.com/giampaolo/psutil/issues/875.
    See: https://stackoverflow.com/questions/4457745#4457745.
    cs�d}d}t|�D]6}z�|g|�Ri|��WSty>}z|}|jtkr9t�|�t|dd�}WYd}~q�d}~ww��d|�d|��}t|j|j	|d��)N�-C��6?�!r*�{�G�z�?z	 retried z: times, converted to AccessDenied as it's still returning r�)
�ranger�r��ERROR_PARTIAL_COPYr��sleep�minrr�r�)r�r�r��delay�times�_r�r�r�r'r(r��s&

����z)retry_error_partial_copy.<locals>.wrapperr�r�r'r�r(�retry_error_partial_copy�src@s�eZdZdZgd�Zdd�Zdd�Zdd�Zed	d
��Z	dd�Z
eed
d���Zee
dd���Zee
dd���Zdd�Zdd�Zedd��Zedd��Zdd�Zedd��Zedd ��ZedNd"d#��Zed$d%��ZedOd'd(��Zed)d*��Zed+d,��Zed-d.��Zed/d0��Zed1d2��Zee
d3d4���Zed5d6��Z edPd8d9��Z!ed:d;��Z"ed<d=��Z#ed>d?��Z$ed@dA��Z%edBdC��Z&edDdE��Z'edFdG��Z(edHdI��Z)edJdK��Z*edLdM��Z+d!S)Q�Processz1Wrapper class around underlying C implementation.)�_cacher��_ppidr�cCs||_d|_d|_dSr`)r�r�r)r�r�r'r'r(r��s
zProcess.__init__cC�|j�|�|j�|�dSr`)�
_proc_infoZcache_activate�exer�r'r'r(�
oneshot_enter��zProcess.oneshot_entercCrr`)rZcache_deactivaterr�r'r'r(�oneshot_exit�r
zProcess.oneshot_exitcCs$t�|j�}t|�tt�ksJ�|S)zOReturn multiple information about this process as a
        raw tuple.
        )rXZ	proc_infor�rY�	pinfo_map�r�r�r'r'r(r�szProcess._proc_infocCs,|jdkrdS|jdkrdStj�|���S)zbReturn process name, which on Windows is always the final
        part of the executable.
        rzSystem Idle Processr1�System)r�rZr[�basenamerr�r'r'r(r��s


zProcess.namec
Csztr,zt�|j�}Wn'ty+}z|jdkr&t|�d��t|j|j�|��d}~wwt�|j�}|�	d�r;t
|�S|S)N�z translated into AccessDeniedrT)�PYPYrXZproc_exer�r��errnorrr�rUr^)r�rr�r'r'r(r�s
��
zProcess.exec
Csntjtjkr/z	tj|jdd�WSty.}zt|�r)tj|jdd�WYd}~S�d}~wwtj|jdd�S)NT)Zuse_pebF)rXZWINVERZWINDOWS_8_1Zproc_cmdliner�r�r��r�r�r'r'r(�cmdline�s��zProcess.cmdlinecCst�|j�}t|�Sr`)rXZproc_environr�r)r�r\r'r'r(�environ	szProcess.environcCs.zt�|jWStyt|j|j�d�wr`)�ppid_mapr��KeyErrorrr�r�r'r'r(�ppids
�zProcess.ppidcCs�zt�|j�WStyZ}zGt|�rUtd�|��}|td|td|td|td|td|td|td|td	|td
|tdf
WYd}~S�d}~ww)Nz*attempting memory_info() fallback (slower)r?rArCrErGrIrKrMrOrQ)rXZproc_memory_infor�r�r�rrr)r�r��infor'r'r(�_get_raw_meminfos(









���zProcess._get_raw_meminfocCs*|��}|d}|d}tj||f|�S)Nr*r6)rreZpmem)r��t�rssZvmsr'r'r(�memory_info,szProcess.memory_infocCs.|��}t�|j�}|t�9}tj||f�Sr`)rrXZproc_memory_ussr�rareZpfullmem)r�Z	basic_memZussr'r'r(�memory_full_info6s
zProcess.memory_full_infoc
csr�zt�|j�}Wnty}z	t||j|j�|�d}~ww|D]\}}}}t|�}t|�}||||fVq!dSr`)rXZproc_memory_mapsr�r�r�r�r^�hex)r��rawr��addr�permr[rr'r'r(�memory_maps=s����zProcess.memory_mapscCst�|j�Sr`)rX�	proc_killr�r�r'r'r(�killJr�zProcess.killcCsH|tjkr
t�|j�dS|tjtjhvrt�|j|�dSd}t	|��)NzPonly SIGTERM, CTRL_C_EVENT and CTRL_BREAK_EVENT signals are supported on Windows)
�signal�SIGTERMrXr$r�ZCTRL_C_EVENTZCTRL_BREAK_EVENTrZr%�
ValueError)r��sigr�r'r'r(�send_signalNs
�zProcess.send_signalNc
Cs�|durtj}nt|d�}ttdtj�}|dur|�|nd}z	t�|j|�}Wn!tjy?}z	t||j|j�|�d}~wtj	yJd}Ynwd}	t
|j�sU|S|re|�|kret||j|jd��t�|�t|dd�}qN)Ni��	monotonicr�Tr�r*r�)
rXZINFINITErm�getattrr�Z	proc_waitr�rr�ZTimeoutAbandoned�
pid_existsr�r�)r��timeoutZcext_timeoutZtimerZstop_atZ	exit_coder�r�r'r'r(�wait[s,�	�

�zProcess.waitcCs,|jdvrdSt�|j�\}}|�d|��S)N�rr1zNT AUTHORITY\SYSTEMrT)r�rXZ
proc_username)r��domainr�r'r'r(r��s
zProcess.usernameFc
Csfzt�|j�\}}}|WSty2}zt|�r-|r�td�|��tdWYd}~S�d}~ww)Nz*attempting create_time() fallback (slower)r0)rX�
proc_timesr�r�r�rrr)r�Z	fast_only�_userZ_system�createdr�r'r'r(r0�s��zProcess.create_timecCs|��tdS)Nr2)rrr�r'r'r(r2�szProcess.num_threadscCs<t�|j�}g}|D]\}}}t�|||�}|�|�q
|Sr`)rXZproc_threadsr�reZpthreadr�)r�r{r�Z	thread_id�utimeZstime�ntupler'r'r(�threads�szProcess.threadsc
Cs~zt�|j�\}}}Wn+ty6}zt|�s�td�|��}|td}|td}WYd}~nd}~wwt�	||dd�S)Nz(attempting cpu_times() fallback (slower)r.r/rl)
rXr2r�r�r�rrrreZ	pcputimes)r�r�r�Z_createdr�rr'r'r(r~�s��zProcess.cpu_timescC�t�|jd�dS)NT�rXZproc_suspend_or_resumer�r�r'r'r(�suspend��zProcess.suspendcCr8)NFr9r�r'r'r(�resume�r;zProcess.resumecCs0|jdvrt|j|j��t�|j�}tj�|�S)Nr0)r�rr�rXZproc_cwdrZr[�normpath)r�r[r'r'r(�cwd�s
zProcess.cwdcCsX|jdvrgSt�}t�|j�}|D]}t|�}t|�r't�|d�}|�|�qt	|�S)Nr0r")
r�r�rXZproc_open_filesr^rreZ	popenfiler�r�)r�r�Zraw_file_names�filer6r'r'r(�
open_files�s

�zProcess.open_files�inetcCst||jd�S)N)r�)r�r�)r�r�r'r'r(r��r�zProcess.net_connectionscC�t�|j�}t|�}|Sr`)rXZproc_priority_getr�r#�r��valuer'r'r(�nice_get��zProcess.nice_getcCst�|j|�Sr`)rXZproc_priority_setr�rCr'r'r(�nice_set�r�zProcess.nice_setcCrBr`)rXZproc_io_priority_getr�r)r
r'r'r(�
ionice_get�rFzProcess.ionice_getcCsL|rd}t|��|tjtjtjtjhvr|�d�}t|��t�|j	|�dS)Nz&value argument not accepted on Windowsz is not a valid priority)
�	TypeErrorr)rrrrr(rXZproc_io_priority_setr�)r�ZioclassrDr�r'r'r(�
ionice_set�s�
zProcess.ionice_setcCs�zt�|j�}Wn?tyG}z3t|�s�td�|��}|td|td|td|td|td|tdf}WYd}~nd}~wwtj	|�S)Nz*attempting io_counters() fallback (slower)r4r5r7r9r;r=)
rXZproc_io_countersr�r�r�rrrreZpio)r�r�r�rr'r'r(�io_counters�s"





���

zProcess.io_counterscCst�|j�}|rtjStjSr`)rXZproc_is_suspendedr�rZSTATUS_STOPPEDZSTATUS_RUNNING)r�Z	suspendedr'r'r(r�szProcess.statuscCsdd�}t�|j�}||�S)Ncs�fdd�td�D�S)Ncsg|]
}d|>�@r|�qS)rr')rv�i�rwr'r(rxszBProcess.cpu_affinity_get.<locals>.from_bitmask.<locals>.<listcomp>�@)r�rMr'rMr(�from_bitmasksz.Process.cpu_affinity_get.<locals>.from_bitmask)rXZproc_cpu_affinity_getr�)r�rO�bitmaskr'r'r(�cpu_affinity_getszProcess.cpu_affinity_getcCsvdd�}tttt����}|D]}||vr-t|t�s$d|�d�}t|��d|��}t|��q||�}t�	|j
|�dS)NcSs4|sd|��}t|��d}|D]}|d|O}q|S)Nzinvalid argument rr*)r()Zlsr��out�br'r'r(�
to_bitmask"s
z,Process.cpu_affinity_set.<locals>.to_bitmaskzinvalid CPU z; an integer is required)r�r�rYr�rrrmrIr(rXZproc_cpu_affinity_setr�)r�rDrTZallcpusZcpur�rPr'r'r(�cpu_affinity_set s

�zProcess.cpu_affinity_setc
CsVzt�|j�WSty*}zt|�r%td�|��tdWYd}~S�d}~ww)Nz*attempting num_handles() fallback (slower)r,)rXZproc_num_handlesr�r�r�rrrrr'r'r(r,:s��zProcess.num_handlescCs|��td}t�|d�S)Nr-r)rrreZpctxsw)r�r-r'r'r(�num_ctx_switchesDszProcess.num_ctx_switchesr`)F)rA),r$r%r&r��	__slots__r�r	rrrr�r�rrrrrrrrr#r%r*r/r�r0r2r7r~r:r<r>r@r�rErGrHrJrKr�rQrUr,rVr'r'r'r(r�s�

	


*















	rr')r")NN)zr�r��enumr�rZr&�sys�	threadingr�r�rrrerrrrr	r
rrr
rrrrrrrrrrrX�ImportErrorr��str�lowerrU�getwindowsversionr��RuntimeErrorZ__extra__all__rr��builtin_module_namesr�IntEnumr!r ZMIB_TCP_STATE_ESTABZCONN_ESTABLISHEDZMIB_TCP_STATE_SYN_SENTZ
CONN_SYN_SENTZMIB_TCP_STATE_SYN_RCVDZ
CONN_SYN_RECVZMIB_TCP_STATE_FIN_WAIT1ZCONN_FIN_WAIT1ZMIB_TCP_STATE_FIN_WAIT2ZCONN_FIN_WAIT2ZMIB_TCP_STATE_TIME_WAITZCONN_TIME_WAITZMIB_TCP_STATE_CLOSEDZ
CONN_CLOSEZMIB_TCP_STATE_CLOSE_WAITZCONN_CLOSE_WAITZMIB_TCP_STATE_LAST_ACKZ
CONN_LAST_ACKZMIB_TCP_STATE_LISTENZCONN_LISTENZMIB_TCP_STATE_CLOSINGZCONN_CLOSINGZMIB_TCP_STATE_DELETE_TCBZPSUTIL_CONN_NONEZ	CONN_NONEr�r#�globalsr��__members__r)r�r�	lru_cacher^rarkroZ	heap_infoZ	heap_trimZdisk_io_countersruryr~r�r�r�r�r�r��Lockr�r�r�r�r�r�r�r�r�r�r�rrr�Zpidsr-rr�r�r�rrr'r'r'r(�<module>s0�
��
�	��������	�
���
����������


			

-