+
     hm  c                   s   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^RI
Ht ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt  ^RI
Ht . RfOt(Rt)Rt*R]PV                  9   t,]PZ                  ! RRRg/4      t.].P^                  t/]P`                  ]Pb                  ]Pd                  ]Pf                  ]Ph                  ]Pj                  ]Pl                  ]Pn                  ]Pp                  ]Pr                  ]Pt                  ]Pv                  ]Px                  ]Pz                  ]P|                  ]P~                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ])]P                  ]P                  /tI ! R  R!]PZ                  4      tJ]K! 4       P                  ]JP                  4        ! R" R#]PZ                  4      tN]K! 4       P                  ]NP                  4       ]O! Rh/ R$^ bR%^bR&^bR'^bR(^bR)^bR*^bR+^bR,^bR-^	bR.^
bR/^bR0^bR1^bR2^bR3^bR4^bR5^bR6^bR7^bR8^bR9^b tP]	! R:. RiO4      tQ]	! R;. RjO4      tR]	! R<. RkO4      tS]	! R>]SP                  Rl,           4      tU]	! R?R@R=.4      tV]	! RARBRCP                  ]VP                  4      ,           4      tX]	! RD. RmO4      tY]P                  ! RERF7      RG 4       t[]RH 4       t\RI t]RJ t^]P                  t_RK t`RL taRM tbRN tcRO tdRP teRQ tfRR tgRSshRT tiRnRU ltjRV tkRW tlRX tmRY tn^ soRZ tpR[ tqR\ trR] ts ! R^ R_4      tt]P                  tu]P                  tv]P                  twR` txRoRa ltyRb tzRc t{ ! Rd Re4      t|R#   ]  dl   t!]"! ]!4      PG                  4       PI                  R4      '       d;   ]PJ                  ! 4       ^ ,          ^8  d   Rt&]&R,          t&]&R,          t&]'! ]&4      ]!hh Rt!A!ii ; i)pz Windows platform implementation.N)
namedtuple)_common)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_windowszdll load failedz3this Windows version is too old (< Windows Vista); z:psutil 3.4.2 is the latest version which supports Windows z2000, XP and 2003 serverAF_LINKZ
DELETE_TCBi+  Z__pypy__AddressFamilyc                   s.    ] tR t^et]t]t]t]t]t]	t	Rt
R# )Priority N)__name__
__module____qualname____firstlineno__r   r   r   r   r   r   __static_attributes__r       8/usr/lib64/python3.14/site-packages/psutil/_pswindows.pyr   r   e   s&    "="=--15r   r   c                   s&    ] tR t^qt^ t^t^t^tRtR# )
IOPriorityr   N)	r   r   r   r   IOPRIO_VERYLOW
IOPRIO_LOWIOPRIO_NORMALIOPRIO_HIGHr   r   r   r   r    r    q   s    NJMKr   r    num_handlesctx_switches	user_timekernel_time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	scputimessvmempmemrsspfullmempmmap_groupedpath	pmmap_extzaddr perms Z pioi   )Zmaxsizec                s    RP                  V P                  R4      R,          4      p\        P                  ! V4      pV \	        V4      R p\
        P                  P                  W#4      # )zConvert paths using native DOS format like:
    "\Device\HarddiskVolume1\Windows\systemew\file.txt"
into:
    "C:\Windows\systemew\file.txt".
\:Ni   NN)joinZsplitcextZQueryDosDevicelenosrA   )sZrawdriveZdriveletterZ	remainder   &   r   convert_dos_pathrK      sR     yyr*+H%%h/K#h-/"I77<<//r   c                  ,    \         P                  ! 4       # N)rF   getpagesizer   r   r   rN   rN      s    r   c                 s    \         P                  ! 4       p V w  rr4TpTpTpWV,
          p\        WV,
          V^R7      p	\        WVWV4      # )z&System virtual memory as a namedtuple.Zround_)rF   virtual_memr   r<   )
memZtotphysZ	availphysZ_totsysZ	_availsystotalZavailfreeusedpercents
             r   virtual_memoryrV      sO    



C-0*GEED=DU]U1=Gwd33r   c                 s.   \         P                  ! 4       p V ^ ,          pV ^,          pW!,
          pV^ 8  d0   \         P                  ! 4       p\        RV,          V,          4      pMRp^ pW5,
          p\	        V^4      p\
        P                  ! W5Wg^ ^ 4      # )z=Swap system memory as a (total, used, free, sin, sout) tuple.g{Gz?        )rF   rP   Zswap_percentintroundr   Zsswap)rQ   Z
total_physZtotal_systemrR   ZpercentswaprT   rS   rU              r   swap_memoryr[      s    



CQJq6L %E
 qy'')4+%-.<DK#G==dQ::r   c                s    \        V \        4      '       d   V P                  \        RR7      p \        P
                  ! V 4      w  rW,
          p\        W1^R7      p\        P                  ! WW$4      # )z'Return disk usage associated with path.Zstrict)ZerrorsrO   )	
isinstanceZbytesZdecoder   rF   
disk_usager   r   Z
sdiskusage)rA   rR   rS   rT   rU      &    r   r]   r]      sY    $ {{8H{5//$'KE<DD2Ge499r   c                s    \         P                  ! V 4      pV Uu. uF  p\        P                  ! V!  NK  	  up# u upi )zReturn disk partitions.)rF   disk_partitionsr   Z	sdiskpart)Zallrawlistx   &  r   r_   r_   	  s5    ""3'G+237aGq!7333s   ;c                 s    \         P                  ! 4       w  rp\        \        \         P                  ! 4       !   Uu. uF  p\        V4      NK  	  up!  p\        WW$P                  VP                  4      # u upi )z)Return system CPU times as a named tuple.)rF   	cpu_timesr;   Zzipper_cpu_timesZsum	interruptdpc)usersystemidleZnZpercpu_summed        r   rc   rc     sh    )D$ T5G5G5I0JK0J1A0JKLMd33]5F5F   Ls   A6c                 s    . p \         P                  ! 4        F%  w  rr4p\        WW4V4      pV P                  V4       K'  	  V # )z6Return system per-CPU times as a list of named tuples.)rF   rd   r;   append)retrg   rh   ri   re   rf   item          r   rd   rd      sC    
C.2.@.@.B*dst<

4 /C Jr   c                 rL   )z0Return the number of logical CPUs in the system.)rF   cpu_count_logicalr   r   r   ro   ro   )  s    !!##r   c                 rL   )z-Return the number of CPU cores in the system.)rF   cpu_count_coresr   r   r   rp   rp   .  s    !!r   c                 sd    \         P                  ! 4       w  rr#^ p\        P                  ! WWC4      # )zReturn CPU statistics.)rF   	cpu_statsr   Z	scpustats)r&   Z
interruptsZ_dpcsZsyscallsZsoft_interruptsrj   r   rq   rq   3  s0    040@-LeO/ r   c                 s    \         P                  ! 4       w  rRp\        P                  ! \	        V 4      V\	        V4      4      .# )zEReturn CPU frequency.
On Windows per-cpu frequency is not supported.
rW   )rF   cpu_freqr   Zscpufreqfloat)ZcurrZmax_Zmin_s      r   rr   rr   <  s6     JDDU4[$d<==r   Fc                 s    \         '       g   \        P                  ! 4        Rs \        P                  ! 4       p \        ;QJ d    . R V  4       F  NK  	  5# ! R V  4       4      # )z|Return the number of processes in the system run queue averaged
over the last 1, 5, and 15 minutes respectively as a tuple.
Tc              3   s:   "   T F  p\        V^4      x  K  	  R# 5i)   N)rY   )Z.0Zload   & r   Z	<genexpr>Zgetloadavg.<locals>.<genexpr>T  s     6IDtQIs   )_loadavg_inititializedrF   Zinit_loadavg_counter
getloadavgZtuple)Z	raw_loads    r   rw   rw   H  sL     "!!!#!% !I56I65656I666r   c                s    \         V ,          w  r#\        P                  ! WV4      p\        4       pV F;  pVw  rxrrp\	        TTT	T
TT\
        VR8X  d   TMRR7      pVP                  V4       K=  	  \        V4      # )zReturn socket connections.  If pid == -1 return system-wide
connections (as opposed to connections opened by one process only).
N)pid)r   rF   net_connectionssetr   TCP_STATUSESaddlist)kind_pidZfamiliesZtypesr`   rl   rm   ZfdZfamZtypeZladdrZraddrstatusry   nts   &&             r   r{   r{   \  s      oOH""459G
%C370eSrzt	
 	  9r   c                 s    / p \         P                  ! 4       pVP                  4        FP  w  r#Vw  rErg\        \        R4      '       d   \        P
                  ! V4      p\        P                  ! WEWgR4      W&   KR  	  V # )z)Get NIC stats (isup, duplex, speed, mtu).	NicDuplex )rF   net_if_statsitemsZhasattrr   r   Z	snicstats)rl   Zrawdictnamer   ZisupZduplexZspeedZmturZ   r   r   r   s  sk    
C!G}}#( e7K((&&v.F%%dEC		 '
 Jr   c                 rL   )zkReturn network I/O statistics for every network interface
installed on the system as a dict of raw tuples.
)rF   net_io_countersr   r   r   r   r     s     !!r   c                 rL   )z,Return the addresses associated to each NIC.)rF   net_if_addrsr   r   r   r   r     s    r   c                 s6   \         P                  ! 4       w  rr#V ^8H  p\        V^,          4      p\        V^,          4      pV'       d   R# V'       g	   V'       d   \        P                  pMVR8X  d   \        P
                  p\        P                  ! W#V4      # )zReturn battery information.Nrz   )rF   sensors_batteryZboolr   ZPOWER_TIME_UNLIMITEDZPOWER_TIME_UNKNOWNZsbattery)Zacline_statusZflagsrU   ZsecsleftZpower_pluggedZ
no_batteryZchargingrn   r   r   r     sw    
 /3.B.B.D+M'!Q&Meck"JEAIH//	R--G}==r   c                 s    \        \        P                  ! 4       4      p \        V \        ,
          4      ^8:  d   \        # V sV # )z:The system boot time expressed in seconds since the epoch.)rs   rF   	boot_timeZabs_last_btime)rl   rx   r   r   r     s7      
!C
3"
r   c                 s    . p \         P                  ! 4       pV F2  pVw  r4p\        P                  ! VRWER4      pV P	                  V4       K4  	  V # )z:Return currently connected users as a list of namedtuples.N)rF   usersr   Zsuserrk   )retlistr`   rm   rg   ZhostnameZtstampr   rn   r   r   r     sM    GjjlG!%]]4x>r  Nr   c               #  sd   "   \         P                  ! 4        F  w  r\        W4      x  K  	  R# 5i)z*Yields a list of WindowsService instances.N)rF   Zwinservice_enumerateWindowsService)r   display_names     r   win_service_iterr     s&     "779T00 :s   .0c                sV    \        V R4      pVP                  4       R,          Vn        V# )zBOpen a Windows service and return it as a WindowsService instance.Nr   )r   _query_config_display_name)r   Zserviceru   r   win_service_getr     s)    T4(G#113NCGNr   c                   s   a  ] tR tRt o RtR tR tR tR tR t	R t
R	 t]P                  R
 4       tR tR tR tR tR tR tR tR tR tRtV tR# )r   i  z(Represents an installed Windows service.c                s    Wn         W n        R # rM   )_namer   )selfr   r      &&&r   __init__ZWindowsService.__init__  s    
)r   c                st    R V P                   : RV P                  : R2pV P                  P                   V 2# )z(name=z, display_name=Z))r   r   Z	__class__r   )r   Zdetailsru   r   __str__ZWindowsService.__str__  s;    4::.8J8J7MQO..))*7)44r   c                sB    R V P                  4        R\        V 4       R2# )Z<z at Z>)r   Zidr      &r   __repr__ZWindowsService.__repr__  s"    4<<>"$r$xj22r   c                sl    \        V\        4      '       g   \        # V P                  VP                  8H  # rM   )r\   r   ZNotImplementedr   r   Zother   &&r   __eq__ZWindowsService.__eq__  s*     %00!!zzU[[((r   c                s    W8X  * # rM   r   r   r   r   __ne__ZWindowsService.__ne__  s      r   c                s    V P                  4       ;_uu_ 4        \        P                  ! V P                  4      w  rr4R R R 4       \	        XXXXR7      #   + '       g   i     L; i)N)r   binpathusername
start_type)_wrap_exceptionsrF   Zwinservice_query_configr   dict)r   r   r   r   r   r^   r   r   ZWindowsService._query_config  sU    ""$$,,TZZ8 8L8 %
 %!	
 	
 %$s   $AA$	c                s    V P                  4       ;_uu_ 4        \        P                  ! V P                  4      w  rR R R 4       X^ 8X  d   R p\	        XVR7      #   + '       g   i     L&; i)N)r   ry   )r   rF   Zwinservice_query_statusr   r   )r   r   ry   rb   r   _query_statusZWindowsService._query_status  sN    ""$$66tzzBKF %!8C6s++	 %$s   #AA*	c              #  s,  "    Rx  R#   \          d}   pT P                  p\        T4      '       d   RT: R2p\        RY#R7      ThTP                  \
        P                  \
        P                  09   d   RT: R2p\        RY#R7      Thh Rp?ii ; i5i)zkCtx manager which translates bare OSError and WindowsError
exceptions into NoSuchProcess and AccessDenied.
Nzservice z( is not querable (not enough privileges)ry   r   msgz does not exist)	OSErrorr   is_permission_errr   winerrorrF   ZERROR_INVALID_NAMEZERROR_SERVICE_DOES_NOT_EXISTr   )r   errr   r   rJ   r   r   ZWindowsService._wrap_exceptions  s     
	 	::D %%th&NO  #t$@cI''11"  !8#4AsJ	s%   B
 BBA7BBBc                    V P                   # )zThe 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   ZWindowsService.name  s    
 zzr   c                r   )zOThe service display name. The value is cached when this class
is instantiated.
)r   r   r   r   r   ZWindowsService.display_name#  s     !!!r   c                0    V P                  4       R,          # )zgThe fully qualified path to the service binary/exe file as
a string, including command line arguments.
r   r   r   r   r   r   ZWindowsService.binpath)  s     !!#I..r   c                r   )z,The name of the user that owns this service.r   r   r   r   r   r   ZWindowsService.username/  s    !!#J//r   c                r   )zBA string which can either be "automatic", "manual" or
"disabled".
r   r   r   r   r   r   ZWindowsService.start_type3  s     !!#L11r   c                r   )zjThe process PID, if any, else None. This can be passed
to Process class to control the service's process.
ry   r   r   r   r   ry   ZWindowsService.pid;  s     !!#E**r   c                r   )zService status as a string.r   r   r   r   r   r   ZWindowsService.statusA  s    !!#H--r   c                sJ    \         P                  ! V P                  4       4      # )zService long description.)rF   Zwinservice_query_descrr   r   r   r   descriptionZWindowsService.descriptionE  s    **499;77r   c                s    V P                  4       pVP                  V P                  4       4       V P                  4       VR&   V P	                  4       VR&   V P                  4       VR&   V# )zEUtility method retrieving all the information above as a
dictionary.
r   r   r   )r   updater   r   r   r   )r   Zdru   r   as_dictZWindowsService.as_dictK  sa      	##%&IIK&	 --/.++--r   )r   r   N)r   r   r   r   __doc__r   r   r   r   r   r   r   
contextlibZcontextmanagerr   r   r   r   r   r   ry   r   r   r   r   __classdictcell__Z__classdict__   @r   r   r     sw     2*53)!
,  0"/02+.8	 	r   r   c                s    \        V \        4      ;'       g.    V P                  \        P                  \        P
                  09   # )z*Return True if this is a permission error.)r\   ZPermissionErrorr   rF   ZERROR_ACCESS_DENIEDZERROR_PRIVILEGE_NOT_HELD)excr   r   r   r     s@     c?+  s||  %%@ 0 r   c                s    \        V 4      '       d   \        WR7      # \        V \        4      '       d   \	        WR7      # V h)z3Convert OSError into NoSuchProcess or AccessDenied.ry   r   )r   r   r\   ZProcessLookupErrorr   )r   ry   r   r   r   convert_oserrorr     s8     //#)**00
Ir   c                F   a  \         P                  ! S 4      V 3R l4       pV# )zDDecorator which converts OSError into NoSuchProcess or AccessDenied.c                 s   <  S! V .VO5/ VB #   \          d(   p\        Y0P                  T P                  R 7      ThRp?ii ; i)r   N)r   r   ry   r   )r   argskwargsr   funs   &*, r   wrapperZ wrap_exceptions.<locals>.wrapper  sG    	Ot-d-f-- 	O!#88$**E3N	Os    A"<A	functoolsZwrapsr   r      f r   wrap_exceptionsr     s)     __SO O Nr   c                r   )zyWorkaround for https://github.com/giampaolo/psutil/issues/875.
See: https://stackoverflow.com/questions/4457745#4457745.
c                 sV  < R p^!p\        V4       F  p S! V .VO5/ VB u # 	  S RV RX 2p\        V P                  V P                  VR7      h  \         dM   pTpTP                  \        8X  d0   \        P
                  ! T4       \        T^,          R4      p Rp?K  h Rp?ii ; i)-C6?{Gz?Nz	 retried z: times, converted to AccessDenied as it's still returning r   )
ranger   r   ERROR_PARTIAL_COPYtimesleepminr   ry   r   )	r   r   r   delayZtimesZ_r   r   r   s	   &*,     r   r   Z)retry_error_partial_copy.<locals>.wrapper  s    uA41$1&11  e9UG $"e% 	 txxdjjcBB  <<#55JJu%	40Es   AB(A B#"B##B(r   r   r   r   retry_error_partial_copyr     s)    
 __SC C& Nr   c                   sZ  a  ] tR tRt o Rt. R)OtR tR tR t]	R 4       t
R t]]	R 4       4       t]]R	 4       4       t]]R
 4       4       tR tR t]R 4       t]R 4       tR t]R 4       t]R 4       t]R*R l4       t]R 4       t]R+R l4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]]R 4       4       t ]R 4       t!]R,R l4       t"]R 4       t#]R 4       t$]R  4       t%]R! 4       t&]R" 4       t']R# 4       t(]R$ 4       t)]R% 4       t*]R& 4       t+]R' 4       t,R(t-V t.R# )-Processi  z1Wrapper class around underlying C implementation.c                s.    Wn         R V n        R V n        R # rM   )ry   r   _ppid)r   ry   r   r   r   ZProcess.__init__  s    

r   c                r    V P                   P                  V 4       V P                  P                  V 4       R # rM   )
_proc_infoZcache_activateexer   r   r   oneshot_enterZProcess.oneshot_enter  s&    &&t,%r   c                r   rM   )r   Zcache_deactivater   r   r   r   oneshot_exitZProcess.oneshot_exit  s&    ((.!!$'r   c                sF    \         P                  ! V P                  4      pV# )z?Return multiple information about this process as a
raw tuple.
)rF   Z	proc_infory   r   rl   ru   r   r   ZProcess._proc_info  s    
 nnTXX&
r   c                s    V P                   ^ 8X  d   R# V P                   ^8X  d   R# \        P                  P                  V P	                  4       4      # )zRReturn process name, which on Windows is always the final
part of the executable.
zSystem Idle ProcessZSystem)ry   rH   rA   Zbasenamer   r   r   r   r   ZProcess.name  s;     88q=(88q=ww
++r   c                s   \         '       d#    \        P                  ! V P                  4      pM \        P                  ! V P                  4      pVP                  R4      '       d   \        V4      # V#   \         dH   pTP
                  ^8X  d1   \        T: R24       \        T P                  T P                  4      Thh Rp?ii ; i)i   z translated into AccessDeniedNrD   )PYPYrF   Zproc_exery   r   Zerrnor   r   r   
startswithrK   )r   r   r   rb   r   r   ZProcess.exe  s     4mmDHH- --)C>>$#C((
   99?SG#@AB&txx<#Es    A3 3C>AC  Cc                sj   \         P                  \         P                  8  d$    \         P                  ! V P                  R R7      # \         P                  ! V P                  R R7      #   \
         d?   p\        T4      '       d(   \         P                  ! T P                  RR7      u Rp?# h Rp?ii ; i)T)Zuse_pebFN)rF   ZWINVERZWINDOWS_8_1Zproc_cmdlinery   r   r   r   r   ru   r   cmdlineZProcess.cmdline   s     ;;$***((4@@ $$TXXt<<  $S)),,TXXuEE	s#   !A) )B242B-&B2,B--B2c                sX    \         P                  ! V P                  4      p\        V4      # rM   )rF   Zproc_environry   r   )r   rI   ru   r   environZProcess.environ  s#     dhh'"1%%r   c                s     \        4       V P                  ,          #   \         d#    \        T P                  T P                  4      R hi ; irM   )ppid_mapry   ZKeyErrorr   r   r   r   r   ppidZProcess.ppid  sA    	@:dhh'' 	@$**54?	@s	    -A
c                sN    \         P                  ! V P                  4      #   \         d   p\	        T4      '       d   \        R 4       T P                  4       pT\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R	,          ,          T\        R
,          ,          3
u Rp?# h Rp?ii ; i)z*attempting memory_info() fallback (slower)r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   N)rF   Zproc_memory_infory   r   r   r   r   	pinfo_map)r   r   inforb   r   _get_raw_meminfoZProcess._get_raw_meminfo  s    	((22 	 %% BC(#456;/06*+#456<01#89:#345:./?34=12  %	s!   " D$C+DD$DD$c                sh    V P                  4       pV^,          pV^,          p\        W#3V,           !  # )rt   )r   r=   )r   Ztr>   vmsrJ   r   memory_infoZProcess.memory_info3  s5    
 !!#ddcZ!^$$r   c                s    V P                  4       p\        P                  ! V P                  4      pV\	        4       ,          p\        W3,           !  # rM   )r   rF   Zproc_memory_ussry   rN   r?   )r   Z	basic_memussrb   r   memory_full_infoZProcess.memory_full_info=  s@    $$&	""488,{}V+,,r   c              #  s  "    \         P                  ! V P                  4      pV F"  w  r#rE\        V4      p\	        V4      pW#WE3x  K$  	  R #   \
         d'   p\        Y`P                  T P                  4      ThR p?ii ; i5irM   )rF   Zproc_memory_mapsry   rK   Zhexr   r   r   )r   ZrawZaddrZpermrA   r>   r      &      r   memory_mapsZProcess.memory_mapsD  sy     
	.''1C *-%D'-4y4-- *-  	F "#xx<#E	Fs'   B A *BA?!A::A??Bc                sB    \         P                  ! V P                  4      # rM   )rF   	proc_killry   r   r   r   killZProcess.killQ  s    ~~dhh''r   c                s   V\         P                  8X  d#   \        P                  ! V P                  4       R# V\         P
                  \         P                  09   d$   \        P                  ! V P                  V4       R# R p\        V4      h)zPonly SIGTERM, CTRL_C_EVENT and CTRL_BREAK_EVENT signals are supported on WindowsN)
signalZSIGTERMrF   r   ry   ZCTRL_C_EVENTZCTRL_BREAK_EVENTrH   r   
ValueError)r   Zsigr   s   && r   send_signalZProcess.send_signalU  s_    &.. NN488$V((&*A*ABBGGDHHc"+  S/!r   Nc                s   Vf   \         P                  pM\        VR,          4      p\        \        R\        P                  4      pVe   V! 4       V,           MR p \         P
                  ! V P                  V4      pRp \        T P                  4      '       g   T# T'       d.   T! 4       T8  d"   \        YP                  T P                  R7      h\        P                  ! T4       \        T^,          R4      pK~    \         P                   d'   p\        YP                  T P                  4      ThR p?i\         P                   d    R p Li ; i)Ni  Z	monotonicr   r   r   )rF   ZINFINITErX   Zgetattrr   Z	proc_waitry   r   r   ZTimeoutAbandoned
pid_existsr   r   )r   ZtimeoutZcext_timeoutZtimerZstop_atZ	exit_coder   r   s   &&      r   waitZProcess.waitb  s   ?==L w~.Lk4995'.':%'G#	 txx>I& dhh''  57g-$W((LLJJu	4(E3 "" 	I ((DJJ?SH$$ 		 I		s$   !C= =E!D33E
EEc                sz    V P                   R9   d   R# \        P                  ! V P                   4      w  rV RV 2# )    zNT AUTHORITY\SYSTEMrD      r   i   )ry   rF   Zproc_username)r   Zdomainrg   rb   r   r   ZProcess.username  s8    88v)))$((3D6""r   c                s    \         P                  ! V P                  4      w  r#pV#   \         dS   p\	        T4      '       d<   T'       d   h \        R 4       T P                  4       \        R,          ,          u Rp?# h Rp?ii ; i)z*attempting create_time() fallback (slower)r)   N)rF   
proc_timesry   r   r   r   r   r   )r   Z	fast_onlyZ_userZ_systemZcreatedr   s   &&    r   r)   ZProcess.create_time  sg    		&*oodhh&?#EGN 	 %%BC(=)ABB	s&   $' BA?-A?8B>A??Bc                sF    V P                  4       \        R ,          ,          # )r*   )r   r   r   r   r   r*   ZProcess.num_threads  s     =!9::r   c                s    \         P                  ! V P                  4      p. pV F.  w  r4p\        P                  ! W4V4      pVP                  V4       K0  	  V# rM   )rF   Zproc_threadsry   r   Zpthreadrk   )r   r`   r   Z	thread_idZutimeZstimentupler   r   threadsZProcess.threads  sM    ##DHH-'.#Ie__Yu=FNN6" (/ r   c                sT    \         P                  ! V P                  4      w  rp\        P                  ! WRR4      #   \         d`   p\	        T4      '       g   h \        R 4       T P                  4       pT\        R,          ,          pT\        R,          ,          p Rp?L}Rp?ii ; i)z(attempting cpu_times() fallback (slower)r'   r(   NrW   )
rF   r   ry   r   r   r   r   r   r   Z	pcputimes)r   rg   rh   Z_createdr   r   s   &     r   rc   ZProcess.cpu_times  s    	4%)__TXX%>"D(   sC88  	4$S))<=??$D	+./D)M23F	4s   #= B'AB""B'c                H    \         P                  ! V P                  R 4       R# )TNrF   Zproc_suspend_or_resumery   r   r   r   suspendZProcess.suspend  s    ##DHHd3r   c                r   )FNr   r   r   r   resumeZProcess.resume  s    ##DHHe4r   c                s    V P                   R9   d!   \        V P                   V P                  4      h\        P                  ! V P                   4      p\
        P                  P                  V4      # )r   r   )ry   r   r   rF   Zproc_cwdrH   rA   Znormpath)r   rA   ru   r   cwdZProcess.cwd  sN     88vtxx44 }}TXX&ww%%r   c                s0   V P                   R9   d   . # \        4       p\        P                  ! V P                   4      pV FI  p\	        V4      p\        V4      '       g   K!  \        P                  ! VR4      pVP                  V4       KK  	  \        V4      # )r   r   rz   )
ry   r|   rF   Zproc_open_filesrK   r	   r   Z	popenfiler~   r   )r   rl   Zraw_file_namesZfiler   r^   r   
open_filesZProcess.open_files  sx    88vIe
 --dhh7"D#D)DT"" **44	 #
 Cyr   c                s.    \        WP                  R 7      # ))r   )r{   ry   )r   r   r   r   r{   ZProcess.net_connections  s    t((33r   c                \    \         P                  ! V P                  4      p\        V4      pV# rM   )rF   Zproc_priority_getry   r   r   valueru   r   nice_getZProcess.nice_get  s$    &&txx0r   c                sD    \         P                  ! V P                  V4      # rM   )rF   Zproc_priority_setry   r   r   r   nice_setZProcess.nice_set  s    %%dhh66r   c                r   rM   )rF   Zproc_io_priority_getry   r    r   ru   r   
ionice_getZProcess.ionice_get  s$    ''1o
r   c                s   V'       d   R p\        V4      hV\        P                  \        P                  \        P                  \        P
                  09  d   V R2p\        V4      h\        P                  ! V P                  V4       R# )z&value argument not accepted on Windowsz is not a valid priorityN)
	TypeErrorr    r!   r"   r#   r$   r   rF   Zproc_io_priority_setry   )r   Zioclassr   r   s   &&& r   
ionice_setZProcess.ionice_set  sr    :CC. %%!!$$""	
 
 I56CS/!!!$((G4r   c           	     s    \         P                  ! V P                  4      p\        V!  #   \         d   p\	        T4      '       g   h \        R 4       T P                  4       pT\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          T\        R,          ,          3p Rp?LRp?ii ; i)z*attempting io_counters() fallback (slower)r+   r,   r-   r.   r/   r0   N)	rF   Zproc_io_countersry   r   r   r   r   r   rC   )r   rl   r   r   rJ   r   io_countersZProcess.io_counters  s    	''1C Cy  	$S))>???$DY{+,Y{+,Y{+,Y{+,Y012Y012C	s    + C!B!CC!c                s    \         P                  ! V P                  4      pV'       d   \        P                  # \        P
                  # rM   )rF   Zproc_is_suspendedry   r   ZSTATUS_STOPPEDZSTATUS_RUNNING)r   Z	suspendedru   r   r   ZProcess.status  s1    **4884	))))))r   c                sX    R  p\         P                  ! V P                  4      pV! V4      # )c                 sr    \        ^@4       Uu. uF  p^V,          V ,          '       g   K  VNK  	  up# u upi )i@   )r   )ra   Ziru   r   from_bitmaskZ.Process.cpu_affinity_get.<locals>.from_bitmask!  s,    $Ry9y!Q!VqLLAAy999s   44)rF   Zproc_cpu_affinity_getry   )r   r  bitmaskrb   r   cpu_affinity_getZProcess.cpu_affinity_get  s(    	: ,,TXX6G$$r   c                s8   R  p\        \        \        \        4       4      4      4      pV FB  pWC9  g   K  \	        V\
        4      '       g   RV: R2p\        V4      hRV: 2p\        V4      h	  V! V4      p\        P                  ! V P                  V4       R# )c                 sn    V '       g   R V : 2p\        V4      h^ pV  F  pV^V,          ,          pK  	  V# )zinvalid argument )r   )Zlsr   ZoutZbrJ   r   
to_bitmaskZ,Process.cpu_affinity_set.<locals>.to_bitmask)  s<    )"0 o%Cq!t Jr   zinvalid CPU z; an integer is requiredN)r   r   rG   rd   r\   rX   r   r   rF   Zproc_cpu_affinity_setry   )r   r   r  ZallcpusZcpur   r  s   &&     r   cpu_affinity_setZProcess.cpu_affinity_set'  s    	 uS123C!!#s++(/GHC#C.($SG, o%  U#""488W5r   c                s     \         P                  ! V P                  4      #   \         dJ   p\	        T4      '       d3   \        R 4       T P                  4       \        R,          ,          u Rp?# h Rp?ii ; i)z*attempting num_handles() fallback (slower)r%   N)rF   Zproc_num_handlesry   r   r   r   r   r   r   ru   r   r%   ZProcess.num_handlesA  sZ    	((22 	 %%BC(=)ABB		s    " A6=A1*A60A11A6c                st    V P                  4       \        R ,          ,          p\        P                  ! V^ 4      # )r&   )r   r   r   Zpctxsw)r   r&   ru   r   num_ctx_switchesZProcess.num_ctx_switchesK  s)    (>)BC~~lA..r   )r   r   ry   )Z_cacher   r   ry   rM   )F)Zinet)/r   r   r   r   r   Z	__slots__r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r)   r*   r   rc   r   r   r   r   r{   r   r   r   r  r  r   r  r  r%   r  r   r   r   r   r   r   r     s    ;3I&(  
,   " =  = &  &@. % % - -. ( ( 
" 
" () ()T # #   ; ;   9 9 4 4 5 5 &  &    4 4  
 7 7  
 5 5  $ * * % % 6 62   / /r   r   )r   r   r   r   r   r   r   r   r!   r"   r#   r$   CONN_DELETE_TCBr   rz   r   )rg   rh   ri   re   rf   )rR   Z	availablerU   rT   rS   )r>   r   r1   r2   r3   r4   r5   Zpeak_nonpaged_poolZnonpaged_poolr8   r9   Zprivate)r   )Z
read_countZwrite_countZ
read_bytesZwrite_bytesZother_countZother_bytes)rz   )NN)}r   r   Zenumr   rH   r   Zsysr   Zcollectionsr    r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   rF   ZImportErrorr   ZstrZlowerr   Zgetwindowsversionr   ZRuntimeErrorZ__extra__all__r	  r   Zbuiltin_module_namesr   ZIntEnumr   r   ZMIB_TCP_STATE_ESTABZCONN_ESTABLISHEDZMIB_TCP_STATE_SYN_SENTZCONN_SYN_SENTZMIB_TCP_STATE_SYN_RCVDZCONN_SYN_RECVZMIB_TCP_STATE_FIN_WAIT1ZCONN_FIN_WAIT1ZMIB_TCP_STATE_FIN_WAIT2ZCONN_FIN_WAIT2ZMIB_TCP_STATE_TIME_WAITZCONN_TIME_WAITZMIB_TCP_STATE_CLOSEDZ
CONN_CLOSEZMIB_TCP_STATE_CLOSE_WAITZCONN_CLOSE_WAITZMIB_TCP_STATE_LAST_ACKZCONN_LAST_ACKZMIB_TCP_STATE_LISTENZCONN_LISTENZMIB_TCP_STATE_CLOSINGZCONN_CLOSINGZMIB_TCP_STATE_DELETE_TCBZPSUTIL_CONN_NONEZ	CONN_NONEr}   r   Zglobalsr   Z__members__r    r   r   r;   r<   r=   Z_fieldsr?   r@   rE   rB   rC   Z	lru_cacherK   rN   rV   r[   Zdisk_io_countersr]   r_   rc   rd   ro   rp   rq   rr   rv   rw   r{   r   r   r   r   r   r   r   r   r   r   Zpidsr   r   r   r   r   r   r   r   r   r   <module>r
     s  
 '    	  
  "   ! " #  #  "  + ( " 8 8 0 0 2 4)*
$  S---_y"o>


 	g66!6!6!6!6  '"8"8  '"8"8  '"8"8w11!!7#:#:!6!6w22 4 4!!?7,,"6t|| 6 	  %% &  	  '' (   	
           
  !" #$ %& '( )* +, -	B {EG	 	7MN
 56 j$,,":;?VUO<-*?*?!@@B	  7 8 S!	0 "	0 	 		4;> (( 	:4	$
"
>  7(.	">2  1} }X yy__
==
8K/ K/{  C##$566!!#A&* DKK))3S(s   O QA&P<<Q