gfdZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddl m Z ddl mZdd l mZdd l mZdd l mZdd l mZdd l mZddl mZddl mZddl mZddl mZddl mZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z% ddl mZ&nn#e'$rfZ(e)e(*+dr0ej,dd krd!Z-e-d"z Z-e-d#z Z-e.e-dZ([(wwxYwej/d$krddl0Z0ndZ0gd%Z1d&Z2d'Z3d(ej4vZ5e0d)Z6ne0j7d*d+d)iZ8e8j6Z6e&j9e j:e&j;e j<e&j=e j>e&j?e j@e&jAe jBe&jCe jDe&jEe jFe&jGe jHe&jIe jJe&jKe jLe&jMe jNe&jOe2e&jPe jQi ZRe05Gd,d-e0j7ZSeTUeSjVe0 dZWdZXd.ZYd/ZZn5Gd0d1e0j7Z[eTUe[jVe\did2dd3dd4d.d5d/d6d7d8d9d:d d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXZ]e dYgdZZ^e d[gd\Z_e d]gd^Z`e d_e`jad`zZbe dadbdcgZce dddedfdecjazZee dggdhZfedijdkZgdlZhedmZidnZjdoZke&jlZldpZmdqZndrZodsZpdtZqduZrdvZsdwZtdxaudyZvddzZwd{Zxd|Zyd}Zzd~Z{da|dZ}dZ~dZdZGddeZe&jZe&jZe&jZdZddZdZdZGddeZdS)z Windows platform implementation.N) namedtuple)_common) AccessDenied) conn_tmap)conn_to_ntuple)debug)ENCODING) ENCODING_ERRS) isfile_strict)memoize)memoize_when_activated) NoSuchProcess)parse_environ_block)TimeoutExpired) usage_percent)long) lru_cache)PY3range)unicode)ABOVE_NORMAL_PRIORITY_CLASS)BELOW_NORMAL_PRIORITY_CLASS)HIGH_PRIORITY_CLASS)IDLE_PRIORITY_CLASS)NORMAL_PRIORITY_CLASS)REALTIME_PRIORITY_CLASS)_psutil_windowszdll load failedz3this 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_iterwin_service_getrrrrrrIOPRIO_VERYLOW IOPRIO_LOW IOPRIO_NORMAL IOPRIO_HIGHCONN_DELETE_TCBAF_LINK DELETE_TCBi+__pypy__ AddressFamilyr*c&eZdZeZeZeZeZeZeZdS)PriorityN) __name__ __module__ __qualname__rrrrrrs/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/psutil/_pswindows.pyr0r0ms4&A#&A#11 5"9r5r0r!ceZdZdZdZdZdZdS) IOPriorityrrr7r!N)r1r2r3r%r&r'r(r4r5r6r9r9}s"   r5r9 num_handles ctx_switches user_time kernel_time create_timer" num_threads io_rcount io_wcount io_rbytes io_wbytes io_count_others io_bytes_others num_page_faults peak_wset wsetpeak_paged_pool paged_poolpeak_non_paged_poolnon_paged_poolpagefile peak_pagefile mem_private scputimes)usersystemidle interruptdpcsvmem)total availablepercentusedfreepmem) rssvmsrLrNrPrRrTpeak_nonpaged_pool nonpaged_poolrZr\privatepfullmem)uss pmmap_groupedpathrm pmmap_extz addr perms  pio) read_count write_count read_bytes write_bytes other_count other_bytesi)maxsizecd|ddd}tj|}|t |d}t j||S)zConvert paths using native DOS format like: "\Device\HarddiskVolume1\Windows\systemew\file.txt" into: "C:\Windows\systemew\file.txt" \Nr!)joinsplitcextwin32_QueryDosDevicelenosru)srawdrive driveletter remainders r6convert_dos_pathrsbyyrr*++H+H55K#h--..!I 7<< Y / //r5ctr|St|tr|S|tt S)zmEncode a unicode string to a byte string by using the default fs encoding + "replace" error handler. )r isinstancestrencoder r )rs r6 py2_strencoders< 5 a   5H88Hm44 4r5c(tjSN)r getpagesizer4r5r6rrs    r5ctj}|\}}}}}}|}|}|} ||z } t||z |d} t||| | | S)z&System virtual memory as a namedtuple.rround_)r virtual_memrrf) memtotphys availphystotpagef availpageftotvirtfreevirtrgavailrkrjris r6virtual_memoryrsh    CBE?GY*gx E E D 5=DUU]U1===G wd 3 33r5ctj}|d}|d}||z }t||d}tj||||ddS)z=Swap system memory as a (total, used, free, sin, sout) tuple.r7r!rrr)rrrrsswap)rrgrkrjris r6 swap_memoryrsY    C FE q6D 4z#disk_partitions..s 3 3 3aG q ! 3 3 3r5)rdisk_partitions)allrawlists r6rrs&"3''G 3 37 3 3 33r5ctj\}}}tdttjD}t||||j|jS)z)Return system CPU times as a named tuple.c,g|]}t|Sr4)sum)rns r6rzcpu_times.. sKKK1AKKKr5)r cpu_timesr`zip per_cpu_timesrdre)rarbrc percpu_summeds r6rrse))D&$KKT5G5I5I0JKKKLM T64",m.? A AAr5cg}tjD]0\}}}}}t|||||}||1|S)z6Return system per-CPU times as a list of named tuples.)rrr`append)retrarbrcrdreitems r6rr%sY C.2.@.B.B*fdIsvtY<< 4 Jr5c(tjS)z0Return the number of logical CPUs in the system.)rcpu_count_logicalr4r5r6rr.s  ! # ##r5c(tjS)z6Return the number of physical CPU cores in the system.)rcpu_count_physr4r5r6cpu_count_physicalr3s    r5cdtj\}}}}d}tj||||S)zReturn CPU statistics.r)r cpu_statsr scpustats)r; interruptsdpcssyscallssoft_interruptss r6rr8s;/3~/?/?,L*dHO  \:% ' ''r5ctj\}}d}tjt ||t |gS)zMReturn CPU frequency. On Windows per-cpu frequency is not supported. )rcpu_freqrscpufreqfloat)currmax_min_s r6rr@s<JD$ D  U4[[$d < < ==r5Fctstjdatj}t d|DS)z~Return the number of processes in the system run queue averaged over the last 1, 5, and 15 minutes respectively as a tupleTc.g|]}t|dS)r7)round)rloads r6rzgetloadavg..Ws 777T%a..777r5)_loadavg_inititializedrinit_loadavg_counter getloadavgtuple) raw_loadss r6rrLsM "& !###!%!!I 77Y777 8 88r5c |tvr7td|dddtDt|\}}tj|||}t }|D]E}|\}}} } } } } t ||| | | | t|dkr| nd}||Ft|S)zReturn socket connections. If pid == -1 return system-wide connections (as opposed to connections opened by one process only). zinvalid z kind argument; choose between z, c,g|]}t|Sr4)reprrs r6rz#net_connections..es,H,H,HT!WW,H,H,Hr5r-N)pid) r ValueErrorrrnet_connectionssetr TCP_STATUSESaddlist)kind_pidfamiliestypesrrrfdfamtypeladdrraddrstatusrnts r6rr_s 9j DD$)),H,Hi,H,H,H"I"I"IKLL LoOHe"4599G %%C370CueVS BT5%'+rzzt===  99r5c|i}tj}|D]\}}ts;t |t sJt |t|}|\}}}}ttdrtj |}tj ||||||<|S)z)Get NIC stats (isup, duplex, speed, mtu). NicDuplex) r net_if_statsitemsrrrrrhasattrrr snicstats)rrawdictnamerisupduplexspeedmtus r6rrqs C!!G}}@@ e 'dG,, 8 8d4jj 8 8, &&D#( feS 7K ( ( /&v..F%dFE3??D Jr5c~tj}td|DS)zsReturn network I/O statistics for every network interface installed on the system as a dict of raw tuples. c6g|]\}}t||fSr4r)rkvs r6rz#net_io_counters..s)???41a-""A&???r5)rnet_io_countersdictrrs r6rrs7   C ??399;;??? @ @@r5cg}tjD]>}t|}t|d|d<||?|S)z,Return the addresses associated to each NIC.r)r net_if_addrsrrr)rrs r6r r sY C"$$U  q**a 5 Jr5ctj\}}}}|dk}t|dz}t|dz}|rdS|s|r tj}n|dkr tj}tj|||S)zReturn battery information.rrENr-)rsensors_batteryboolrPOWER_TIME_UNLIMITEDPOWER_TIME_UNKNOWNsbattery) acline_statusflagsrisecsleft power_plugged no_batterychargings r6r r s /3.B.D.D+M5'8!Q&Meck""JEAIHt../ R-  GX} = ==r5cttj}t|tz dkrtS|a|S)z:The system boot time expressed in seconds since the epoch.r)rr boot_timeabs _last_btimers r6rrsA   ! !C 3 ""  r5cg}tj}|D]D}|\}}}t|}tj|d||d}||E|S)z:Return currently connected users as a list of namedtuples.N)rusersrrsuserr)retlistrrrahostnametstamprs r6rrskGjllG!%hT"" ]4x > >r Nr5c#KtjD]1\}}tt|t|V2dS)z*Yields a list of WindowsService instances.N)rwinservice_enumerateWindowsServicer)r display_names r6r#r#sZ"799OOl]400- 2M2MNNNNNNOOr5cdt|d}|d|_|S)zBOpen a Windows service and return it as a WindowsService instance.Nr$)r# _query_config _display_name)rservices r6r$r$s/T4((G#1133NCG Nr5ceZdZdZdZdZdZdZdZdZ dZ e j d Z d Zd Zd Zd ZdZdZdZdZdZdS)r#z(Represents an installed Windows service.c"||_||_dSr)_namer')selfrr$s r6__init__zWindowsService.__init__s )r5cHd|jd|jd}|jj|S)Nz(name=z, display_name=))r+r' __class__r1)r,detailss r6__str__zWindowsService.__str__s4 JJJ***,00''::r5cRd|dt|dS)N)r2idr,s r6__repr__zWindowsService.__repr__s%#||~~~~r$xxxx88r5cZt|tstS|j|jkSr)rr#NotImplementedr+r,others r6__eq__zWindowsService.__eq__s+%00 "! !zU[((r5c||k Srr4r;s r6__ne__zWindowsService.__ne__s5=  r5c$|5tj|j\}}}}dddn #1swxYwYt t |t |t |t |S)N)r$binpathusername start_type)_wrap_exceptionsrwinservice_query_configr+rr)r,r$rArBrCs r6r&zWindowsService._query_configs  " " $ $ 9 9,TZ88 8L'8Z 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9&|44!'**"8,,$Z00 222 2sAAAc|5tj|j\}}dddn #1swxYwY|dkrd}t ||S)Nr)rr)rDrwinservice_query_statusr+r)r,rrs r6 _query_statuszWindowsService._query_statuss  " " $ $ C C6tzBBKFC C C C C C C C C C C C C C C C !88C6s++++s>AAc#K dVdS#t$rr}t|rtd|jd|jz|jt jt jfvrtd|jd|jzd}~wwxYw)z{Ctx manager which translates bare OSError and WindowsError exceptions into NoSuchProcess and AccessDenied. Nz2service %r is not querable (not enough privileges)rrmsgzservice %r does not exist)) OSErroris_permission_errrr+winerrorrERROR_INVALID_NAMEERROR_SERVICE_DOES_NOT_EXISTrr,errs r6rDzWindowsService._wrap_exceptions s   EEEEE    %% "4:L #$$$$$"9"&"C"EEE#4:4tzACCCC s BA-BBc|jS)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+r7s r6rzWindowsService.name!s zr5c|jS)z_The service display name. The value is cached when this class is instantiated. )r'r7s r6r$zWindowsService.display_name(s !!r5c6|dS)zwThe fully qualified path to the service binary/exe file as a string, including command line arguments. rAr&r7s r6rAzWindowsService.binpath.s!!##I..r5c6|dS)z,The name of the user that owns this service.rBrVr7s r6rBzWindowsService.username4s!!##J//r5c6|dS)zRA string which can either be "automatic", "manual" or "disabled". rCrVr7s r6rCzWindowsService.start_type8s!!##L11r5c6|dS)zzThe process PID, if any, else None. This can be passed to Process class to control the service's process. rrHr7s r6rzWindowsService.pid@s!!##E**r5c6|dS)zService status as a string.rrZr7s r6rzWindowsService.statusFs!!##H--r5chttj|S)zService long description.)rrwinservice_query_descrrr7s r6 descriptionzWindowsService.descriptionJs#T8EEFFFr5c|}||||d<||d<||d<|S)zUUtility method retrieving all the information above as a dictionary. rr$r^)r&updaterHrr$r^)r,ds r6as_dictzWindowsService.as_dictPsu     ##%%&&&IIKK&  --//.++---r5N)r1r2r3__doc__r-r2r8r=r?r&rH contextlibcontextmanagerrDrr$rArBrCrrr^rbr4r5r6r#r#s,22***;;; 999)))!!! 2 2 2,,,,""" /// 000222+++ ...GGG     r5r#ct|ts J||jtjtjfvp(t |ddt jt jfvS)z*Return True if this is a permission error.rNr-) rrLerrnoEPERMEACCESgetattrrERROR_ACCESS_DENIEDERROR_PRIVILEGE_NOT_HELD)excs r6rMrMsg c7 # #((S(( # 9el3 3 HZ$$)A)-)F)H HHr5ct|ts J|t|rt||S|jtjkrt ||S|)z3Convert OSError into NoSuchProcess or AccessDenied.rr)rrLrMrrgESRCHr)rmrrs r6convert_oserrorrqsj c7 # #((S(( #0$//// yEK40000 Ir5cFtjfd}|S)zDDecorator which converts OSError into NoSuchProcess or AccessDenied.cz |g|Ri|S#t$r!}t||j|jd}~wwxYw)Nro)rLrqrr+)r,argskwargsrRfuns r6wrapperz wrap_exceptions..wrapperse F3t-d---f-- - F F F!#48$*EEE E Fs  :5: functoolswrapsrvrws` r6wrap_exceptionsr|s=_SFFFFF Nr5cFtjfd}|S)zWorkaround for https://github.com/giampaolo/psutil/issues/875. See: https://stackoverflow.com/questions/4457745#4457745 c:d}d}t|D]a}  |g|Ri|cS#t$rD}|}|jtkr,t j|t |dzd}Yd}~Yd}~wwxYw d|d|}t|j|j |)N-C6?!r7{Gz?z retried z: times, converted to AccessDenied as it's still returning rJ) r WindowsErrorrNERROR_PARTIAL_COPYtimesleepminrrr+) r,rtrudelaytimesr_rRrKrvs r6rwz)retry_error_partial_copy..wrappersu G GA s41$111&11111   <#555Ju%%% 400EHHHH ),UUUCC9C48$*#FFF Fs & A49A/.A//A4rxr{s` r6retry_error_partial_copyrs?_SGGGGG$ Nr5ceZdZdZgdZdZdZdZedZ dZ e edZ e e d Ze e d Zd Zd Ze d Ze dZdZe dZe dZe d)dZe dZe dZe dZe dZe dZe dZe dZe e dZe dZ e d*dZ!e dZ"e d Z#e d!Z$e d"Z%e d#Z&e d$Z'e d%Z(e d&Z)e d'Z*e d(Z+dS)+Processz1Wrapper class around underlying C implementation.)rr+_ppid_cachec0||_d|_d|_dSr)rr+r)r,rs r6r-zProcess.__init__s  r5cn|j||j|dSr) _proc_infocache_activateexer7s r6 oneshot_enterzProcess.oneshot_enters4 &&t,,, %%%%%r5cn|j||j|dSr)rcache_deactivaterr7s r6 oneshot_exitzProcess.oneshot_exits4 ((... !!$'''''r5ctj|j}t|ttksJ|S)zOReturn multiple information about this process as a raw tuple. )r proc_inforr pinfo_mapr,rs r6rzProcess._proc_infos7 nTX&&3xx3y>>)))) r5c|jdkrdS|jdkrdStj|S)zbReturn process name, which on Windows is always the final part of the executable. rzSystem Idle Processr"System)rrrubasenamerr7s r6rz Process.namesC 8q==(( 8q==8w +++r5ctre tj|j}nc#t$r=}|jdkr,t d|zt|j|jd}~wwxYwtj|j}tst|}| drt|S|S)Nz%r forced into AccessDeniedr) PYPYrproc_exerrrgr rr+rr startswithr)r,rrRs r6rz Process.exes  * mDH--   9??7#=>>>&tx<<<  -))C %$$C >>$   )#C(( ( s# A*8A%%A*cVtjtjkr` tj|jd}n^#t $r6}t |rtj|jd}nYd}~n#d}~wwxYwtj|jd}tr|Sd|DS)NT)use_pebFc,g|]}t|Sr4r)rrs r6rz#Process.cmdline..s 222M!$$222r5)rWINVER WINDOWS_8_1 proc_cmdlinerrLrMr)r,rrRs r6cmdlinezProcess.cmdlines ;$* * * '$???   $S))+DHeDDDCCCCCC  #DHd;;;C  3J22c222 2s8 A8,A33A8ctj|j}|r3ts,t |t sJt |tt|Sr) r proc_environrrrrrrr)r,ustrs r6environzProcess.environs_ **  9 9dG,, 8 8d4jj 8 8,"=#6#6777r5c t|jS#t$rt|j|jwxYwr)ppid_maprKeyErrorrr+r7s r6ppidz Process.ppid!sG 6::dh' ' 6 6 6$*55 5 6s %Ac  tj|jS#t$r}t |r|}|t d|t d|t d|t d|t d|t d|t d|t d|t d |t d f cYd}~Sd}~wwxYw) NrLrNrPrRrTrVrXrZr\r^)rproc_memory_inforrLrMrr)r,rRinfos r6_get_raw_meminfozProcess._get_raw_meminfo's (22 2    %% ((#456;/06*+#456<01#89:#345:./?34=12        # s! D CD=D DD cf|}|d}|d}t||f|zS)Nr7rC)rrl)r,trmrns r6 memory_infozProcess.memory_info=s;  ! ! # #ddc3\A%&&r5c|}tj|j}|t z}t ||fzSr)rrproc_memory_ussrrrr)r, basic_memrss r6memory_full_infozProcess.memory_full_infoGsE$$&& "48,, {}}cW,--r5c#$K tj|j}|D]C\}}}}t|}tst |}t |}||||fVDdS#t$r }t||j|j d}~wwxYwr) rproc_memory_mapsrrrrhexrLrqr+)r,rawaddrpermrurmrRs r6 memory_mapszProcess.memory_mapsNs .'11C *- . .%dD#'--/(..D4yyT4-----  . .  = = ="#tx<< < =sA%% B/B  Bc4tj|jSr)r proc_killrr7s r6killz Process.kill]s~dh'''r5c:|tjkrtj|jdS|t tdt t tdt fvrtj|j|dStd)N CTRL_C_EVENTCTRL_BREAK_EVENTzPonly SIGTERM, CTRL_C_EVENT and CTRL_BREAK_EVENT signals are supported on Windows) signalSIGTERMrrrrjobjectrrr)r,sigs r6 send_signalzProcess.send_signalas &. N48 $ $ $ $ $ WV^VXX>>V%7BBDDD GDHc " " " " "+,, ,r5Nc8| tj}nt|dz}ttdtj}| ||znd} tj|j|}n@#tj$rt||j|jtj $rd}YnwxYwd} t|js|S|r*||krt||j|jt j |t|dzd}j)Ni monotonicrTror7r) rINFINITEintrjr proc_waitrrr+TimeoutAbandoned pid_existsrr)r,timeout cext_timeouttimerstop_at exit_coders r6waitz Process.waitnsA ?=LLw~..Lk4955'.':%%''G## tx>>II" @ @ @ $(DJ?? ?$   III  )dh'' !   M5577g--$W$(LLLL Ju    4((E  )sA//:B,+B,c|jdvrdStj|j\}}t|dzt|zS)Nrr"zNT AUTHORITY\SYSTEMr)rr proc_usernamer)r,domainras r6rBzProcess.usernamesK 8v  )))$(33 V$$t+mD.A.AAAr5c tj|j\}}}|S#t$r?}t |r*|t dcYd}~Sd}~wwxYw)Nr>)r proc_timesrrLrMrr)r,rarbcreatedrRs r6r>zProcess.create_times $(ODH$=$= !D&'N    %% C((=)ABBBBBBB  s ! A*3A%A*$A%%A*cL|tdS)Nr?)rrr7s r6r?zProcess.num_threadss  =!9::r5ctj|j}g}|D]1\}}}tj|||}||2|Sr)r proc_threadsrrpthreadr)r,rr thread_idutimestimentuples r6threadszProcess.threadss\#DH--'. # # #Iue_Yu==F NN6 " " " "r5c0 tj|j\}}}na#t$rT}t |s|}|t d}|t d}Yd}~nd}~wwxYwtj||ddS)Nr<r=r) rrrrLrMrrr pcputimes)r,rarbrrRrs r6rzProcess.cpu_timess 4$(ODH$=$= !D&'' 4 4 4$S)) ??$$D +./D)M23FFFFFF  4 vsC888s A>A A99A>c:tj|jddS)NTrproc_suspend_or_resumerr7s r6suspendzProcess.suspends #DHd33333r5c:tj|jddS)NFrr7s r6resumezProcess.resumes #DHe44444r5c|jdvrt|j|jtj|j}t t j|S)Nr) rrr+rproc_cwdrrrunormpath)r,rus r6cwdz Process.cwdsV 8v  tx44 4}TX&&RW--d33444r5cJ|jdvrgSt}tj|j}|D]`}t |}t |r@t st|}tj |d}| |at|S)Nrr-) rrrproc_open_filesrr rrr popenfilerr)r,rraw_file_names_filers r6 open_fileszProcess.open_filess 8v  Iee -dh77#  E$U++EU## 1)%00E *5"55Cyyr5inetc.t||jS)N)r)rr)r,rs r6 connectionszProcess.connectionsst$(3333r5cdtj|j}tt |}|Sr)rproc_priority_getrenumr0r,values r6nice_getzProcess.nice_gets*&tx00  UOOE r5c6tj|j|Sr)rproc_priority_setrrs r6nice_setzProcess.nice_sets%dh666r5cdtj|j}tt |}|Sr)rproc_io_priority_getrrr9rs r6 ionice_getzProcess.ionice_gets*'11  S//C r5c|rtd|ttttfvrt d|zt j|j|dS)Nz&value argument not accepted on Windowsz%s is not a valid priority) TypeErrorr%r&r'r(rrproc_io_priority_setr)r,ioclassrs r6 ionice_setzProcess.ionice_setsd  FDEE E >:}&( ( (9GCDD D !$(G44444r5c  tj|j}n#t$r}t |s|}|t d|t d|t d|t d|t d|t df}Yd}~nd}~wwxYwt|S)NrArBrDrFrHrJ)rproc_io_countersrrLrMrrrx)r,rrRrs r6 io_counterszProcess.io_counters s '11CC   $S)) ??$$DY{+,Y{+,Y{+,Y{+,Y012Y012 CCCCCC Cys CBB==Cchtj|j}|r tjStjSr)rproc_is_suspendedrrSTATUS_STOPPEDSTATUS_RUNNING)r, suspendeds r6rzProcess.statuss.*4844  *) )) )r5cPd}tj|j}||S)Nc:fdtdDS)Nc$g|] }d|zz | S)rr4)rirs r6rzBProcess.cpu_affinity_get..from_bitmask..'s&999!Q!VqL9A999r5@r)rs`r6 from_bitmaskz.Process.cpu_affinity_get..from_bitmask&s#9999uRyy999 9r5)rproc_cpu_affinity_getr)r,r bitmasks r6cpu_affinity_getzProcess.cpu_affinity_get$s3 : : :,TX66|G$$$r5cRd}tttt}|D]F}||vr@t |t t fstd|ztd|zG||}tj |j |dS)NcL|std|zd}|D] }|d|zz} |S)Nzinvalid argument %rrr7)r)lsoutbs r6 to_bitmaskz,Process.cpu_affinity_set..to_bitmask-sF = !6!;<<<C  qAv Jr5z&invalid CPU %r; an integer is requiredzinvalid CPU %r) rrrrrrrrrrproc_cpu_affinity_setr)r,rr)allcpuscpur"s r6cpu_affinity_setzProcess.cpu_affinity_set+s   uS112233 = =C'!!!#T{33=#@3FHHH%%5%;<<< "*U## "48W55555r5c tj|jS#t$r?}t |r*|t dcYd}~Sd}~wwxYw)Nr:)rproc_num_handlesrrLrMrrrQs r6r:zProcess.num_handlesDsv (22 2    %% C((=)ABBBBBBB  s  A$3AA$AA$cv|td}tj|dS)Nr;r)rrrpctxsw)r,r;s r6num_ctx_switcheszProcess.num_ctx_switchesMs-((>)BC ~lA...r5r)r),r1r2r3rc __slots__r-rrrrrr|rrrrrrrrrrrrrBr>r?rrrrrrrrr r rrrr#r-r:r2r4r5r6rrs;;333I&&&((( , , ,_&33_3$88_8 666 ,''_'.._. . . .((_( , ,_ ,()()()_()TBB_B   _ ;;_;_ 9 9_ 944_455_555_5_$444_4_ 77_7_ 55_5_"**_*%%_% 66_60_//_///r5rr4)r-)NN)rcrdrgryrrsysr collectionsrrrrrr r r r r rrrrr_compatrrrrrrrrrrrrr ImportErrorrRrlowerrgetwindowsversionrK RuntimeError version_infor__extra__all__r)rbuiltin_module_namesrr*IntEnumr.MIB_TCP_STATE_ESTABCONN_ESTABLISHEDMIB_TCP_STATE_SYN_SENT CONN_SYN_SENTMIB_TCP_STATE_SYN_RCVD CONN_SYN_RECVMIB_TCP_STATE_FIN_WAIT1CONN_FIN_WAIT1MIB_TCP_STATE_FIN_WAIT2CONN_FIN_WAIT2MIB_TCP_STATE_TIME_WAITCONN_TIME_WAITMIB_TCP_STATE_CLOSED CONN_CLOSEMIB_TCP_STATE_CLOSE_WAITCONN_CLOSE_WAITMIB_TCP_STATE_LAST_ACK CONN_LAST_ACKMIB_TCP_STATE_LISTEN CONN_LISTENMIB_TCP_STATE_CLOSING CONN_CLOSINGMIB_TCP_STATE_DELETE_TCBPSUTIL_CONN_NONE CONN_NONErr0globalsr` __members__r%r&r'r(r9rrr`rfrl_fieldsrrrtrrvrxrrrrrdisk_io_countersrrrrrrrrrrrrrr r rrrr#r$rr#pidsrrrMrqr|rrr4r5r6r^s  '&  """"""!!!!!!######""""""""""""++++++""""""((((((######""""""888888888888000000000000222222444444)))))))    s3xx~~""#455  !C ! # #A & * * D KK ))l3  vKKKK D   "S--<GG DL9b/BBM#G g6!6!6 '"8 '"8 '"8w1!7#:!6w2 4!?7, :::::4<::: GIIX)***<NJMKKT\  GIIZ+,,, D     a         a a a a B B B b    B! "r# $% &2' (R) *"+ ,-  @ J{EEE G G   7MMMNNz  5 5 566 :j$,": ; ; ?VUO<< J-*?!@!@@ B B j77788 3 0 0 0 5 5 5   4 4 4;;;( : : :444AAA$$$ !!! '''>>> 9 9 9&$   AAA>>>2       "OOO zzzzzVzzzR y _ =HHH4J/J/J/J/J/fJ/J/J/J/J/s<CD.A!D))D.