§ <ˆjgVãóf —dZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z n #e$rdZ YnwxYwddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&ddlm'Z'ddlm(Z(ddlm)Z)ddlm*Z*dd lm+Z+dd!lm,Z,dd"lm-Z-dd#lm.Z.dd$lm/Z/dd%lm0Z0dd&lm1Z1dd'lm2Z2dd(lm3Z3dd)lm4Z4dd*lm5Z5dd+lm6Z6dd,lm7Z7dd-lm8Z8dd.lm9Z9dd/lm:Z:dd0lm;Z;dd1lmZ>dd4lm?Z@dd5lAmBZCdd6lAmDZDdd7lAmEZEdd8lAmFZGdd9lAmHZHe r!d:ZIdd;lmJZKddlJmNZNdd?lJmOZOn’e8rIdd@lmPZKddAlQmRZRddBlQmSZSddClQmTZTddDlQmUZUddElQmVZVddFlQmWZWddGlPmXZXddHlPmYZYddIlPmZZZddJlPm[Z[ddKlPm\Z\nGe!rddLlm]ZKn>erddMlm^ZKn5e7rddNlm_ZKddOl_m`Z`ddPl_maZad:ZIner ddQlmbZKd:ZInecdRe jdz¦«‚gdS¢Zeee feKjg¦«eheKjidT¦«roddUlmjZjek¦«ZldZmenej¦«D]OZmem odV¦«r8em p¦«r$eqejem¦«elem<ee rem¦«ŒP[l[meKjsZsdWZtdXZuevdY„eu wdZ¦«D¦«¦«Zxeqe d[e j ¦«Zydazda{e|¦«Z}e~eu dZd\¦«¦«eqeKj€d]d¦«kr�d^eKj€j�zZ‚eheKj€d]¦«r=e‚d_dZ ƒd`„e„eKj€j…¦«D¦«¦«›daeu›db�z Z‚ne‚dceuzz Z‚e‚ddeqeKj€dedf¦«zz Z‚e‚dgz Z‚ee‚¦«‚eheKdh¦«reKj†Z‡ndi„Z‡dj„Zˆdk„Z‰Gdl„dme|¦«ZieŠdn„enei¦«D¦«¦«Z‹Gdo„dpei¦«ZŒdq„Z�dr„ZŽia�džds„Z�dždt„Z‘dŸdv„Z’d dx„Z“ e“¦«a”n #e•$rda”YnwxYw e“du¬y¦«a–n #e•$rda–YnwxYwdz„Z—d{„Z˜d|„Z™d¡d}„Zš�t(a›�t,aœd¡d~„Z�d„ZžeheKd€¦«rd d�„ZŸee rd€¦«ehed‚¦«s eheKd‚¦«r0ehed‚¦«rej Z neKj Z ee rd‚¦«dƒ„Z¡d„„Z¢d…„Z£d d†„Z¤d¢d‡„Z¥ej¦e@j§dˆ¦«e¥_§d‰e¥j§_d¢dŠ„Z¨ej¦e@j§d‹¦«e¨_§d‰e¨j§_d£d�„Z©dŽ„Zªd�„Z«eheKd�¦«rd d‘„Z¬ee rd�¦«eheKd’¦«rd“„Z­ee rd’¦«eheKd”¦«rd•„Z®ee rd”¦«d–„Z¯d—„Z°e8rd˜„Z±d™„Z²dš„Z³d›„Z´[>[e jxddœkr[µ[¶e·d�kr e´¦«dSdS)¤a/psutil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors) in Python. Supported platforms: - Linux - Windows - macOS - FreeBSD - OpenBSD - NetBSD - Sun Solaris - AIX Works with Python versions 2.7 and 3.4+. é)ÚdivisionNé)Ú_common)ÚAIX)ÚBSD)Ú CONN_CLOSE)ÚCONN_CLOSE_WAIT)Ú CONN_CLOSING)ÚCONN_ESTABLISHED)ÚCONN_FIN_WAIT1)ÚCONN_FIN_WAIT2)Ú CONN_LAST_ACK)Ú CONN_LISTEN)Ú CONN_NONE)Ú CONN_SYN_RECV)Ú CONN_SYN_SENT)ÚCONN_TIME_WAIT)ÚFREEBSD)ÚLINUX)ÚMACOS)ÚNETBSD)ÚNIC_DUPLEX_FULL)ÚNIC_DUPLEX_HALF)ÚNIC_DUPLEX_UNKNOWN)ÚOPENBSD)ÚOSX)ÚPOSIX)ÚPOWER_TIME_UNKNOWN)ÚPOWER_TIME_UNLIMITED)Ú STATUS_DEAD)ÚSTATUS_DISK_SLEEP)Ú STATUS_IDLE)Ú STATUS_LOCKED)Ú STATUS_PARKED)ÚSTATUS_RUNNING)ÚSTATUS_SLEEPING)ÚSTATUS_STOPPED)ÚSTATUS_TRACING_STOP)ÚSTATUS_WAITING)Ú STATUS_WAKING)Ú STATUS_ZOMBIE)ÚSUNOS)ÚWINDOWS)Ú AccessDenied)ÚError)Ú NoSuchProcess)ÚTimeoutExpired)Ú ZombieProcess)Úmemoize_when_activated)Ú wrap_numbers)ÚPY3)ÚPermissionError)ÚProcessLookupError)ÚSubprocessTimeoutExpired)Úlongz/proc)Ú_pslinux)ÚIOPRIO_CLASS_BE)ÚIOPRIO_CLASS_IDLE)ÚIOPRIO_CLASS_NONE)ÚIOPRIO_CLASS_RT)Ú _pswindows)ÚABOVE_NORMAL_PRIORITY_CLASS)ÚBELOW_NORMAL_PRIORITY_CLASS)ÚHIGH_PRIORITY_CLASS)ÚIDLE_PRIORITY_CLASS)ÚNORMAL_PRIORITY_CLASS)ÚREALTIME_PRIORITY_CLASS)ÚCONN_DELETE_TCB)Ú IOPRIO_HIGH)Ú IOPRIO_LOW)Ú IOPRIO_NORMAL)ÚIOPRIO_VERYLOW)Ú_psosx)Ú_psbsd)Ú_pssunos)Ú CONN_BOUND)Ú CONN_IDLE)Ú_psaixzplatform %s is not supported)Gr/r0r2r.r1Ú version_infoÚ __version__r%r"r&r!r'r(r+r r*r#r)r#r$r rrr r rrr rrr rÚAF_LINKrrrrrrrrrrrrrr,r-rÚProcessÚPopenÚ pid_existsÚpidsÚ process_iterÚ wait_procsÚvirtual_memoryÚ swap_memoryÚ cpu_timesÚ cpu_percentÚcpu_times_percentÚ cpu_countÚ cpu_statsÚnet_io_countersÚnet_connectionsÚ net_if_addrsÚ net_if_statsÚdisk_io_countersÚdisk_partitionsÚ disk_usageÚusersÚ boot_timeÚrlimit)Ú _psutil_posixÚRLIMzGiampaolo Rodola'z5.9.5có,—g|]}t|¦«‘ŒS©)Úint)Ú.0Únums úF/opt/cloudlinux/venv/lib64/python3.11/site-packages/psutil/__init__.pyú rs×s€ÐAÐAÐA 3•c˜#‘h”hÐAÐAÐAóú.Ú monotonicÚÚversionzOversion conflict: %r C extension module was built for another version of psutilz (có—g|]}|‘ŒSrnrn©rpÚxs rrrsrsês€Ð?Ð?Ð?˜A�aÐ?Ð?Ð?rtz instead of ú)z (different than %s)z;; you may try to 'pip uninstall psutil', manually remove %sÚ__file__z%the existing psutil install directoryz1 or clean the virtual env somehow, then reinstallÚppid_mapcó®—i}t¦«D]C} tj|¦« ¦«||<Œ-#tt f$rYŒ@wxYw|S)z{Return a {pid: ppid, ...} dict for all running processes in one shot. Used to speed up Process.children(). )rWÚ _psplatformrTÚppidr0r2)ÚretÚpids rrÚ _ppid_mapr„ýsm€ðˆÝ‘6”6ð ð ˆCð Ý&Ô.¨sÑ3Ô3×8Ò8Ñ:Ô:��C‘�øÝ!¥=Ð1ð ð ð Ø�ð øøøàˆ s”)>¾AÁAcóF‡—tj‰¦«ˆfd„¦«}|S)zpDecorator which raises NoSuchProcess in case a process is no longer running or its PID has been reused. có”•—| ¦«s(|jrd}nd}t|j|j|¬¦«‚‰|g|¢Ri|¤ŽS)Nz4process no longer exists and its PID has been reused©Úmsg)Ú is_runningÚ _pid_reusedr0rƒÚ_name)ÚselfÚargsÚkwargsrˆÚfuns €rrÚwrapperz'_assert_pid_not_reused..wrapperseø€à�ŠÑ Ô ð ?ØÔð ØL��à�Ý ¤¨$¬*¸#Ð>Ñ>Ô>Ð >؈s�4Ð)˜$Ð)Ð)Ð) &Ð)Ð)Ð)rt)Ú functoolsÚwraps)r�r�s` rrÚ_assert_pid_not_reusedr“ s:ø€õ„_�SÑÔð*ð*ð*ð*ñÔð*ð €NrtcóÆ—tj¦«}t||z ¦«}|dkrd}nd}tj |¦« |¦«S)z(Format seconds in a human readable form.i€Qz%H:%M:%Sz%Y-%m-%d %H:%M:%S)ÚtimeroÚdatetimeÚ fromtimestampÚstrftime)ÚsecsÚnowÚsecs_agoÚfmts rrÚ _pprint_secsr�sX€å Œ)‰+Œ+€CÝ�3˜‘:‰Œ€HØ�,ÒÐØˆˆà!ˆÝ Ô × *Ò *¨4Ñ 0Ô 0× 9Ò 9¸#Ñ >Ô >Ð>rtcó|—eZdZdZdEd„ZdFd„Zd„ZeZd„Zd„Z d „Z e d „¦«Z e jd „¦«ZdGd „Zd „Zd„Zd„Zed„¦«Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZdEd„Zered„¦«Zd„Z d„Z!d„Z"e#e$j%d¦«rd„Z&e#e$j%d¦«rdGd „Z'e#e$j%d!¦«rdEd"„Z(e#e$j%d#¦«rdEd$„Z)e#e$j%d%¦«rd&„Z*e#e$j%d'¦«rd(„Z+e,rd)„Z-d*„Z.d+„Z/e#e$j%d,¦«rd-„Z0e1dFd.„¦«Z2dEd/„Z3ed0„¦«Z4ed1„¦«Z5e6j7d2¬3¦«d4„¦«Z8d5„Z9dHd7„Z:e#e$j%d8¦«rdId:„Z;d;„Z„Z>e1d?„¦«Z?e1d@„¦«Z@e1dA„¦«ZAe1dB„¦«ZBe1dC„¦«ZCdEdD„ZDdS)KrTa)Represents an OS process with the given PID. If PID is omitted current process PID (os.getpid()) is used. Raise NoSuchProcess if PID does not exist. Note that most of the methods of this class do not make sure the PID of the process being queried has been reused over time. That means you might end up retrieving an information referring to another process in case the original one this instance refers to is gone in the meantime. The only exceptions for which process identity is pre-emptively checked and guaranteed are: - parent() - children() - nice() (set) - ionice() (set) - rlimit() (set) - cpu_affinity (set) - suspend() - resume() - send_signal() - terminate() - kill() To prevent this problem for all other methods you can: - use is_running() before querying the process - if you're continuously iterating over a set of Process instances use process_iter() which pre-emptively checks process identity for every yielded instance Ncó0—| |¦«dS©N)Ú_init)rŒrƒs rrÚ__init__zProcess.__init__Ks€Ø � Š �3‰ŒˆˆˆrtFcó¤—|€tj¦«}nMts.t|tt f¦«st d|z¦«‚|dkrtd|z¦«‚||_d|_ d|_ d|_ d|_ d|_ d|_tj¦«|_d|_t'j|¦«|_d|_d|_t0|_ | ¦«n@#t6$rYn4t8$rYn)t:$r|st;|d¬¦«‚d|_ YnwxYw|j|j f|_dS)Nzpid must be an integer (got %r)rz'pid must be a positive integer (got %s)Fzprocess PID not foundr‡T) ÚosÚgetpidÚ_PY3Ú isinstanceror9Ú TypeErrorÚ ValueErrorÚ_pidr‹Ú_exeÚ _create_timeÚ_gonerŠÚ_hashÚ threadingÚRLockÚ_lockÚ_ppidr€rTÚ_procÚ_last_sys_cpu_timesÚ_last_proc_cpu_timesÚ _SENTINELÚ _exitcodeÚ create_timer.r2r0rƒÚ_ident)rŒrƒÚ _ignore_nsps rrr¡z Process._initNs†€Ø ˆ;Ý”)‘+”+ˆCˆCåð I¥ ¨3µµd° Ñ <Ô <ð IÝÐ AÀCÑ GÑHÔHÐHØ�QŠwˆwÝ Ð!JØ#&ñ"'ñ(ô(ð(àˆŒ ؈Œ ؈Œ Ø ˆÔ؈Œ Ø ˆÔ؈Œ Ý”_Ñ&Ô&ˆŒ àˆŒ õ!Ô(¨Ñ-Ô-ˆŒ Ø#'ˆÔ Ø$(ˆÔ!Ý"ˆŒð "Ø × Ò Ñ Ô Ð Ð øÝð ð ð ð ˆDÝð ð ð ð ˆDÝð "ð "ð "Øð "Ý# CÐ-DÐEÑEÔEÐEà!�” � � ð  "øøøð”x Ô!2Ð3ˆŒ ˆ ˆ sÃ(C=Ã= D:Ä D:Ä#D:Ä9D:c ó†—tj¦«}|j|d<|jr |j|d<| ¦«5 | ¦«|d<| ¦«|d<n0#t$rd|d<Ynt$rd|d<Ynt$rYnwxYw|j tdfvr |j |d<|j rt|j ¦«|d<|jj›d|jj›d d  d „| ¦«D¦«¦«›d �cddd¦«S#1swxYwYdS) NrƒÚnameÚstatusÚzombieÚ terminatedÚexitcodeÚstartedruú(ú, có"—g|] \}}|›d|›�‘Œ S)ú=rn)rpÚkÚvs rrrsz#Process.__str__..”s'€ÐEÐEÐE±°°1 a a a¨¨Ð+ÐEÐEÐErtr|)Ú collectionsÚ OrderedDictrƒr‹Úoneshotr¼r½r2r0r.r·r¶r¬r�Ú __class__Ú __module__Ú__name__ÚjoinÚitems)rŒÚinfos rrÚ__str__zProcess.__str__~sÉ€ÝÔ&Ñ(Ô(ˆØ”hˆˆU‰ Ø Œ:ð &Øœ:ˆD�‰LØ �\Š\‰^Œ^ð Hð Hð Ø#Ÿyšy™{œ{��V‘ Ø!%§¢¡¤��X‘�øÝ ð *ð *ð *Ø!)��X‘��Ý ð .ð .ð .Ø!-��X‘��Ýð ð ð Ø�ð øøøàŒ~¥i°Ð%6Ð6Ð6Ø#'¤>��ZÑ ØÔ ð BÝ".¨tÔ/@Ñ"AÔ"A��Y‘à”Ô)Ð)Ð)Ø”Ô'Ð'Ð'Ø— ’ ÐEÐE¸¿ º ¹ ¼ ÐEÑEÔEÑFÔFÐFÐFðHð Hð Hð Hð Hñ Hô Hð Hð Hð Hð Hð Hð Høøøð Hð Hð Hð Hð Hð HsOÁD6Á.A4Á3D6Á4B!ÂD6ÂB!ÂD6 B!ÂD6 B!Â!BD6Ä6D:Ä=D:cóZ—t|t¦«stS|j|jkSr )r§rTÚNotImplementedr¹©rŒÚothers rrÚ__eq__zProcess.__eq__˜s+€õ˜%¥Ñ)Ô)ð "Ý!Ð !ØŒ{˜eœlÒ*Ð*rtcó—||k Sr rnrÔs rrÚ__ne__zProcess.__ne__Ÿs€Ø˜5’=Ð Ð rtcóP—|j€t|j¦«|_|jSr )r®Úhashr¹©rŒs rrÚ__hash__zProcess.__hash__¢s#€Ø Œ:РݘdœkÑ*Ô*ˆDŒJØŒzÐrtcó—|jS)zThe process PID.)rªrÛs rrrƒz Process.pid§s €ðŒyÐrtc#ó¼K—|j5t|d¦«rdV—�n£ |j |¦«|j |¦«|j |¦«t r|j |¦«|j  ¦«dV—|j  |¦«|j  |¦«|j  |¦«t r|j  |¦«|j  ¦«n�#|j  |¦«|j  |¦«|j  |¦«t r|j  |¦«|j  ¦«wxYwddd¦«dS#1swxYwYdS)a#Utility context manager which considerably speeds up the retrieval of multiple process information at the same time. Internally different process info (e.g. name, ppid, uids, gids, ...) may be fetched by using the same routine, but only one information is returned and the others are discarded. When using this context manager the internal routine is executed once (in the example below on name()) and the other info are cached. The cache is cleared when exiting the context manager block. The advice is to use this every time you retrieve more than one information about the process. If you're lucky, you'll get a hell of a speedup. >>> import psutil >>> p = psutil.Process() >>> with p.oneshot(): ... p.name() # collect multiple info ... p.cpu_times() # return cached value ... p.cpu_percent() # return cached value ... p.create_time() # return cached value ... >>> Ú_cacheN) r±Úhasattrr\Úcache_activateÚ memory_infor�rÚuidsr³Ú oneshot_enterÚcache_deactivateÚ oneshot_exitrÛs rrrÊzProcess.oneshot®s èè€ð6ŒZð& .ð& .Ý�t˜XÑ&Ô&ð% .ð ���‘ð.à”N×1Ò1°$Ñ7Ô7Ð7àÔ$×3Ò3°DÑ9Ô9Ð9à”I×,Ò,¨TÑ2Ô2Ð2åð7Øœ ×0Ò0°Ñ6Ô6Ð6à”J×,Ò,Ñ.Ô.Ð.Ø�E�E�Eà”N×3Ò3°DÑ9Ô9Ð9ØÔ$×5Ò5°dÑ;Ô;Ð;Ø”I×.Ò.¨tÑ4Ô4Ð4Ýð9Øœ ×2Ò2°4Ñ8Ô8Ð8Ø”J×+Ò+Ñ-Ô-Ð-Ð-øð ”N×3Ò3°DÑ9Ô9Ð9ØÔ$×5Ò5°dÑ;Ô;Ð;Ø”I×.Ò.¨tÑ4Ô4Ð4Ýð9Øœ ×2Ò2°4Ñ8Ô8Ð8Ø”J×+Ò+Ñ-Ô-Ð-Ð-øøøðM& .ð& .ð& .ñ& .ô& .ð& .ð& .ð& .ð& .ð& .ð& .ð& .øøøð& .ð& .ð& .ð& .ð& .ð& .s+ŠG¢B D7Â.B GÄ7B GÇGÇGÇGc óŽ—t}|�­t|tttt f¦«st dt|¦«z¦«‚t |¦«}||z }|rPtdt|¦«dkrdnd›dd  tt|¦«¦«›�¦«‚i}|p|}|  ¦«5|D]X} |d kr|j}nt||¦«} | ¦«}n'#t t"f$r|}Ynt$$r|r‚YŒOwxYw|||<ŒY ddd¦«n #1swxYwY|S) aäUtility method returning process information as a hashable dictionary. If *attrs* is specified it must be a list of strings reflecting available Process class' attribute names (e.g. ['cpu_times', 'name']) else all public (read only) attributes are assumed. *ad_value* is the value which gets assigned in case AccessDenied or ZombieProcess exception is raised when retrieving that particular process information. Nzinvalid attrs type %szinvalid attr namerÚsrwú rÃrƒ)Ú_as_dict_attrnamesr§ÚlistÚtupleÚsetÚ frozensetr¨Útyper©ÚlenrÎÚmapÚreprrÊrƒÚgetattrr.r2ÚNotImplementedError) rŒÚattrsÚad_valueÚ valid_namesÚ invalid_namesÚretdictÚlsr¼r‚Úmeths rrÚas_dictzProcess.as_dictñsÑ€õ)ˆ Ø Ð Ý˜e¥d­Eµ3½ Ð%BÑCÔCð GÝÐ 7½$¸u¹+¼+Ñ EÑFÔFÐFݘ‘J”JˆEØ! KÑ/ˆMØð :Ý �jݘ}Ñ-Ô-°Ò1Ð1�C�C°rÐ9Ð9Ø—I’I�c¥$¨ Ñ6Ô6Ñ7Ô7Ð7ð"9ñ:ô:ð:ðˆØ Ð !�kˆØ �\Š\‰^Œ^ð $ð $Øð $ð $�ðؘu’}�}Ø"œh˜˜å& t¨TÑ2Ô2˜Ø"˜d™fœf˜øøÝ$¥mÐ4ð#ð#ð#Ø"�C�C�CÝ*ðððððØØ�Hð øøøð!$�˜‘ � ð! $ð $ð $ð $ñ $ô $ð $ð $ð $ð $ð $ð $øøøð $ð $ð $ð $ð$ˆsBÃD:Ã(DÃ?D:ÄD$ÄD:Ä D$Ä!D:Ä#D$Ä$ D:Ä:D>ÅD>có2—t�tnt¦«d}|j|krdS| ¦«}|�Q| ¦«} t |¦«}| ¦«|kr|SdS#t $rYdSwxYwdS)z�Return the parent process as a Process object pre-emptively checking whether PID has been reused. If no parent is known return None. Nr)Ú _LOWEST_PIDrWrƒr�r¸rTr0)rŒÚ lowest_pidr�ÚctimeÚparents rrrzProcess.parents°€õ %0Ð$;•[�[ÅÁÄÈĈ Ø Œ8�zÒ !Ð !Ø�4Ø�yŠy‰{Œ{ˆØ Ð Ø×$Ò$Ñ&Ô&ˆEð Ý  ™œ�Ø×%Ò%Ñ'Ô'¨5Ò0Ð0Ø!�Mð1Ð0øõ!ð ð ð Ø��ð øøøð Ð sÁ(B BÂBcóŒ—g}| ¦«}|�+| |¦«| ¦«}|­+|S)z�Return the parents of this process as a list of Process instances. If no parents are known return an empty list. )rÚappend)rŒÚparentsÚprocs rrrzProcess.parents0sJ€ðˆØ�{Š{‰}Œ}ˆØÐØ �NŠN˜4Ñ Ô Ð Ø—;’;‘=”=ˆDðÐðˆrtcó¶—|js|jrdS |t|j¦«k|_|j S#t$rYdSt $r d|_YdSwxYw)z•Return whether this process is running. It also checks if PID has been reused by another process in which case return False. FT)r­rŠrTrƒr2r0rÛs rrr‰zProcess.is_running;s‹€ð Œ:ð ˜Ô)ð Ø�5ð ð $¥w¨t¬xÑ'8Ô'8Ò8ˆDÔ ØÔ'Ð'Ð 'øÝð ð ð ð�4�4Ýð ð ð ØˆDŒJØ�5�5ð øøøs’$7· AÁAÁAcóš—tr|j ¦«S|jp|j ¦«|_|jS)z`The process parent PID. On Windows the return value is cached after first call. )rr³r�r²rÛs rrr�z Process.ppidTs@€õ ð Ø”:—?’?Ñ$Ô$Ð $àœÐ8 t¤z§¢Ñ'8Ô'8ˆDŒJØ”:Ð rtcó’—tr|j�|jS|j ¦«}tr~t |¦«dkrk | ¦«}|rThe process name. The return value is cached after first call.Nér) r-r‹r³r¼rrðÚcmdliner¤ÚpathÚbasenameÚ startswithr.r2)rŒr¼r Ú extended_names rrr¼z Process.namefsÔ€õ ð �t”zÐ-Ø”:Ð ØŒz�ŠÑ Ô ˆÝ ð -•S˜‘Y”Y "’_�_ð -ØŸ,š,™.œ.�ðð-Ý$&¤G×$4Ò$4°W¸Q´ZÑ$@Ô$@�MØ$×/Ò/°Ñ5Ô5ð-Ø,˜øøõ!¥-Ð0ð ð ð ð �ð  øøøðˆŒ ؈Œ ÔØˆ sÁ BÂB1Â0B1cóô‡—ˆfd„}‰j€e ‰j ¦«}|s ||¬¦«}n#t$rYnwxYw|‰_n##t$r}||¬¦«cYd}~Sd}~wwxYw‰jS)zŽThe process executable as an absolute path. May also be an empty string. The return value is cached after first call. có„•—‰ ¦«}|r‘ttd¦«r|ttd¦«rg|d}tj |¦«r@tj |¦«r!tj|tj¦«r|St|t¦«r|‚|S)NÚaccessÚX_OKr) r ràr¤r ÚisabsÚisfilerrr§r.)Úfallbackr ÚexerŒs €rrÚguess_itzProcess.exe..guess_itŠs¬ø€ð—l’l‘n”nˆGØð �7¥2 xÑ0Ô0ð µW½RÀÑ5HÔ5Hð Ø˜a”j�õ”G—M’M #Ñ&Ô&ðÝœŸš sÑ+Ô+ðåœ  #¥r¤wÑ/Ô/ðð�Jݘ(¥LÑ1Ô1ð Ø�؈OrtN)r)r«r³rr.)rŒrrÚerrs` rrrz Process.exe…sÕø€ð  ð ð ð ð ð" Œ9Ð ð Ø”j—n’nÑ&Ô&�ðððØ&˜h°Ð4Ñ4Ô4˜˜øÝ'ðððØ˜ðøøøà�” � øõ ð .ð .ð .Ø�x¨Ð-Ñ-Ô-Ð-Ð-Ð-Ð-Ð-Ð-øøøøð .øøøðŒyÐs,�A« 8¸ AÁAÁ A0Á A+Á%A0Á+A0có4—|j ¦«S)z3The command line this process has been called with.)r³r rÛs rrr zProcess.cmdline¬s€àŒz×!Ò!Ñ#Ô#Ð#rtcód— |j ¦«S#t$r tcYSwxYw)z2The process current status as a STATUS_* constant.)r³r½r2r+rÛs rrr½zProcess.status°sB€ð !Ø”:×$Ò$Ñ&Ô&Ð &øÝð !ð !ð !Ý Ð Ð Ð ð !øøøs ‚›/®/có—trht€td¦«‚| ¦«j} tj|¦«jS#t$rt|¦«cYSwxYw|j   ¦«S)ztThe name of the user that owns the process. On UNIX this is calculated by using *real* process uid. Nz0requires pwd module shipped with standard python) rÚpwdÚ ImportErrorrãÚrealÚgetpwuidÚpw_nameÚKeyErrorÚstrr³Úusername)rŒÚreal_uids rrr#zProcess.username·s”€õ ð )݈{å!ØFñHôHðHà—y’y‘{”{Ô'ˆHð %Ý”| HÑ-Ô-Ô5Ð5øÝð %ð %ð %å˜8‘}”}Ð$Ð$Ð$ð %øøøð”:×&Ò&Ñ(Ô(Ð (s¸AÁA-Á,A-cóZ—|j€|j ¦«|_|jS)z The process creation time as a floating point number expressed in seconds since the epoch. The return value is cached after first call. )r¬r³r¸rÛs rrr¸zProcess.create_timeÉs,€ð Ô Ð $Ø $¤ × 6Ò 6Ñ 8Ô 8ˆDÔ ØÔ Ð rtcó4—|j ¦«S)z6Process current working directory as an absolute path.)r³ÚcwdrÛs rrr'z Process.cwdÒs€àŒz�~Š~ÑÔÐrtcóÌ—|€|j ¦«S| ¦«st|j|j¦«‚|j |¦«dS)z'Get or set process niceness (priority).N)r³Únice_getr‰r0rƒr‹Únice_set)rŒÚvalues rrÚnicez Process.niceÖs]€à ˆ=Ø”:×&Ò&Ñ(Ô(Ð (à—?’?Ñ$Ô$ð :Ý# D¤H¨d¬jÑ9Ô9Ð9Ø ŒJ× Ò  Ñ &Ô &Ð &Ð &Ð &rtcó4—|j ¦«S)zVReturn process UIDs as a (real, effective, saved) namedtuple. )r³rãrÛs rrrãz Process.uidsás€ð ”:—?’?Ñ$Ô$Ð $rtcó4—|j ¦«S)zVReturn process GIDs as a (real, effective, saved) namedtuple. )r³ÚgidsrÛs rrr/z Process.gidsès€ð”:—?’?Ñ$Ô$Ð $rtcó4—|j ¦«S)zVThe terminal associated with this process, if any, else None. )r³ÚterminalrÛs rrr1zProcess.terminalîs€ð”:×&Ò&Ñ(Ô(Ð (rtcó4—|j ¦«S)zcReturn the number of file descriptors opened by this process (POSIX only). )r³Únum_fdsrÛs rrr3zProcess.num_fdsôs€ð”:×%Ò%Ñ'Ô'Ð 'rtÚ io_counterscó4—|j ¦«S)a Return process I/O statistics as a (read_count, write_count, read_bytes, write_bytes) namedtuple. Those are the number of read/write calls performed and the amount of bytes read and written by the process. )r³r4rÛs rrr4zProcess.io_countersýs€ð”:×)Ò)Ñ+Ô+Ð +rtÚ ionice_getcó�—|€*|�td¦«‚|j ¦«S|j ||¦«S)a´Get or set process I/O niceness (priority). On Linux *ioclass* is one of the IOPRIO_CLASS_* constants. *value* is a number which goes from 0 to 7. The higher the value, the lower the I/O priority of the process. On Windows only *ioclass* is used and it can be set to 2 (normal), 1 (low) or 0 (very low). Available on Linux and Windows > Vista only. Nz$'ioclass' argument must be specified)r©r³r6Ú ionice_set)rŒÚioclassr+s rrÚionicezProcess.ionice sJ€ðˆØÐ$Ý$Ð%KÑLÔLÐLØ”z×,Ò,Ñ.Ô.Ð.à”z×,Ò,¨W°eÑ<Ô<Ðràr@rìÚrangerðr\Úcpu_affinity_setrë)rŒÚcpuss rrÚ cpu_affinityzProcess.cpu_affinity.s±€ðˆ|Ý�c $¤*×"=Ò"=Ñ"?Ô"?Ñ@Ô@ÑAÔAÐAàðIݘtœzÐ+?Ñ@Ô@ðIØ#œz×<Ò<Ñ>Ô>˜˜å$¥U­3­yÀÐ/EÑ/EÔ/EÑ+FÔ+FÑ%GÔ%GÑHÔH˜Ø” ×+Ò+­Dµ°T±´©O¬OÑ<Ô<Ð<Ð<Ð>> import psutil >>> p = psutil.Process() >>> p.children() B, C, D >>> p.children(recursive=True) B, X, Y, C, D Note that in the example above if process X disappears process Y won't be listed as the reference to process A is lost. )r„rÏrƒrTr¸rr0r2rÈÚ defaultdictrëríÚpopÚadd) rŒÚ recursiver~r‚rƒr�ÚchildÚreverse_ppid_mapÚseenÚstackÚ child_pidÚintimes rrÚchildrenzProcess.childrenqsú€õ6‘;”;ˆØˆØð& Ø%Ÿ^š^Ñ-Ô-ð ð ‘ ��Tؘ4œ8Ò#Ð#ðÝ '¨¡ ¤ ˜ð ×+Ò+Ñ-Ô-°×1BÒ1BÑ1DÔ1DÒDÐDØŸJšJ uÑ-Ô-Ð-øøÝ)­=Ð9ðððØ˜ðøøøð$ñ õ +Ô6µtÑ<Ô<Ð Ø%Ÿ^š^Ñ-Ô-ð 3ð 3‘ ��TØ  Ô&×-Ò-¨cÑ2Ô2Ð2Ð2õ‘5”5ˆDØ”X�JˆEØð Ø—i’i‘k”k�ؘ$�;�;ðØ—’˜‘ ” � Ø!1°#Ô!6ð ð �Ið Ý '¨ Ñ 2Ô 2˜ð"&×!1Ò!1Ñ!3Ô!3°u×7HÒ7HÑ7JÔ7JÒ!J˜Ø!ð4ØŸJšJ uÑ-Ô-Ð-Ø!ŸLšL¨Ñ3Ô3Ð3øøÝ)­=Ð9ðððØ˜ðøøøð#ð ð&ˆ s%¸ABÂBÂBÅA%F&Æ&F:Æ9F:có|‡ —|duo|dk}|�|dkrtd|z¦«‚t¦«pdŠ ˆ fd„}|r[|¦«}|j ¦«}t j|¦«|¦«}|j ¦«}nE|j}|j}|¦«}|j ¦«}|�|€||_||_dS|j|jz |j |j z z}||z } ||_||_ || z dz} | ‰ z} t| d¦«S#t$rYdSwxYw)aReturn a float representing the current process CPU utilization as a percentage. When *interval* is 0.0 or None (default) compares process times to system CPU times elapsed since last call, returning immediately (non-blocking). That means that the first time this is called it will return a meaningful 0.0 value. When *interval* is > 0.0 compares process times to system CPU times elapsed before and after the interval (blocking). In this case is recommended for accuracy that this function be called with at least 0.1 seconds between calls. A value > 100.0 can be returned in case of processes running multiple threads on different CPU cores. The returned value is explicitly NOT split evenly between all available logical CPUs. This means that a busy loop process running on a system with 2 logical CPUs will be reported as having 100% CPU utilization instead of 50%. Examples: >>> import psutil >>> p = psutil.Process(os.getpid()) >>> # blocking >>> p.cpu_percent(interval=1) 2.0 >>> # non-blocking (percentage since last call) >>> p.cpu_percent(interval=None) 2.9 >>> Nçrú!interval is not positive (got %r)rcó&•—t¦«‰zSr )Ú_timer)Únum_cpuss€rrÚtimerz"Process.cpu_percent..timerßsø€Ý‘8”8˜hÑ&Ð &rtéd) r©r_r³r\r•Úsleepr´rµÚuserÚsystemÚroundÚZeroDivisionError) rŒÚintervalÚblockingrfÚst1Úpt1Úst2Úpt2Ú delta_procÚ delta_timeÚoverall_cpus_percentÚsingle_cpu_percentres @rrr]zProcess.cpu_percent·s”ø€ðF 4Ð'Ð:¨H°sªNˆØ Ð  H¨q¢L LÝÐ@À8ÑKÑLÔLÐ LÝ‘;”;Ð# !ˆð 'ð 'ð 'ð 'ð 'ð ð Ø�%‘'”'ˆCØ”*×&Ò&Ñ(Ô(ˆCÝ ŒJ�xÑ Ô Ð Ø�%‘'”'ˆCØ”*×&Ò&Ñ(Ô(ˆCˆCàÔ*ˆCØÔ+ˆCØ�%‘'”'ˆCØ”*×&Ò&Ñ(Ô(ˆC؈{˜c˜kØ+.�Ô(Ø,/�Ô)Ø�sà”h ¤Ñ)¨c¬j¸3¼:Ñ.EÑFˆ ؘ3‘Yˆ à#&ˆÔ Ø$'ˆÔ!ð 0ð&0°*Ñ%<ÀÑ$CÐ ð("6¸Ñ!@Ð ÝÐ+¨QÑ/Ô/Ð /øõ)!ð ð ð à�3�3ð øøøsÄD-Ä- D;Ä:D;có4—|j ¦«S)a%Return a (user, system, children_user, children_system) namedtuple representing the accumulated process time, in seconds. This is similar to os.times() but per-process. On macOS and Windows children_user and children_system are always set to 0. )r³r\rÛs rrr\zProcess.cpu_timess€ðŒz×#Ò#Ñ%Ô%Ð%rtcó4—|j ¦«S)aReturn a namedtuple with variable fields depending on the platform, representing memory information about the process. The "portable" fields available on all platforms are `rss` and `vms`. All numbers are expressed in bytes. )r³rârÛs rrrâzProcess.memory_infos€ðŒz×%Ò%Ñ'Ô'Ð'rtrâ)Ú replacementcó*—| ¦«Sr )rârÛs rrÚmemory_info_exzProcess.memory_info_ex)s€à×ÒÑ!Ô!Ð!rtcó4—|j ¦«S)a]This method returns the same information as memory_info(), plus, on some platform (Linux, macOS, Windows), also provides additional metrics (USS, PSS and swap). The additional metrics provide a better representation of actual process memory usage. Namely USS is the memory which is unique to a process and which would be freed if the process was terminated right now. It does so by passing through the whole process address. As such it usually requires higher user privileges than memory_info() and is considerably slower. )r³Úmemory_full_inforÛs rrr}zProcess.memory_full_info-s€ðŒz×*Ò*Ñ,Ô,Ð,rtÚrsscóŽ—ttjj¦«}||vr"t d|›dt |¦«›�¦«‚|tjjvr|jn|j}|¦«}t||¦«}tpt¦«j }|dkst d|z¦«‚|t|¦«z dzS)aÏCompare process memory to total physical system memory and calculate process memory utilization as a percentage. *memtype* argument is a string that dictates what type of process memory you want to compare against (defaults to "rss"). The list of available strings can be obtained like this: >>> psutil.Process().memory_info()._fields ('rss', 'vms', 'shared', 'text', 'lib', 'data', 'dirty', 'uss', 'pss') zinvalid memtype z; valid types are rz`can't calculate process memory percent because total physical system memory is not positive (%r)rg)rër€ÚpfullmemÚ_fieldsr©rìÚpmemrâr}róÚ _TOTAL_PHYMEMrZÚtotalÚfloat)rŒÚmemtypeÚ valid_typesr�Úmetricsr+Ú total_phymems rrÚmemory_percentzProcess.memory_percent=sç€õ�;Ô/Ô7Ñ8Ô8ˆ Ø ˜+Ð %Ð %Ý�*Ø���˜{Ñ+Ô+Ð+ð-ñ.ô.ð .à")­[Ô-=Ô-EÐ"EÐ"EˆdÔÐØ Ô !ð à�#‘%”%ˆÝ˜ Ñ)Ô)ˆõ%Ð>­Ñ(8Ô(8Ô(>ˆ ؘaÒÐåðDàññ ô ð ð�˜lÑ+Ô+Ñ+¨sÑ2Ð2rtÚ memory_mapsTcó:‡‡—|j ¦«}|reiŠ|D]E}|d}|dd…} td„‰||¦«‰|<Œ1#t$r|‰|<YŒBwxYwtjŠˆˆfd„‰D¦«StjŠˆfd„|D¦«S)aüReturn process' mapped memory regions as a list of namedtuples whose fields are variable depending on the platform. If *grouped* is True the mapped regions with the same 'path' are grouped together and the different memory fields are summed. If *grouped* is False every mapped region is shown as a single entity and the namedtuple will also include the mapped region's address space ('addr') and permission set ('perms'). ééNcó —||zSr rn)r{Úys rrúz%Process.memory_maps..ms €°1°q±5€rtcó.•—g|]}‰|g‰|¢RŽ‘ŒSrnrn)rpr ÚdÚnts €€rrrsz'Process.memory_maps..qs/ø€Ð9Ð9Ð9¨t˜˜˜4Ð* ! D¤'Ð*Ð*Ð*Ð9Ð9Ð9rtcó•—g|]}‰|Ž‘ŒSrnrn)rpr{r”s €rrrsz'Process.memory_maps..tsø€Ð+Ð+Ð+ 1˜˜˜A˜Ð+Ð+Ð+rt)r³r‹rñr!r€Ú pmmap_groupedÚ pmmap_ext)rŒÚgroupedÚitÚtuplr Únumsr“r”s @@rrr‹zProcess.memory_maps[sÞøø€ð”×'Ò'Ñ)Ô)ˆBØð ,Ø�Øð'ð'�DØ œ7�DØ   œ8�Dð'Ý"%Ð&8Ð&8¸!¸D¼'À4Ñ"HÔ"H˜˜$™˜øÝ#ð'ð'ð'Ø"&˜˜$™˜˜ð'øøøå Ô.�Ø9Ð9Ð9Ð9Ð9°qÐ9Ñ9Ô9Ð9å Ô*�Ø+Ð+Ð+Ð+¨Ð+Ñ+Ô+Ð+s·AÁA%Á$A%có4—|j ¦«S)z˜Return files opened by process as a list of (path, fd) namedtuples including the absolute file name and file descriptor number. )r³Ú open_filesrÛs rrr�zProcess.open_filesvs€ð Œz×$Ò$Ñ&Ô&Ð&rtÚinetcó6—|j |¦«S)aTReturn socket connections opened by process as a list of (fd, family, type, laddr, raddr, status) namedtuples. The *kind* parameter filters for connections that match the following criteria: +------------+----------------------------------------------------+ | Kind Value | Connections using | +------------+----------------------------------------------------+ | inet | IPv4 and IPv6 | | inet4 | IPv4 | | inet6 | IPv6 | | tcp | TCP | | tcp4 | TCP over IPv4 | | tcp6 | TCP over IPv6 | | udp | UDP | | udp4 | UDP over IPv4 | | udp6 | UDP over IPv6 | | unix | UNIX socket (both UDP and TCP protocols) | | all | the sum of all the possible families and protocols | +------------+----------------------------------------------------+ )r³Ú connections)rŒÚkinds rrr zProcess.connections}s€ð,Œz×%Ò% dÑ+Ô+Ð+rtcó¾—|jdkrJ|j¦«‚|jdkrtd¦«‚ tj|j|¦«dS#t$r]t r4t |j¦«r t|j|j|j ¦«‚d|_ t|j|j¦«‚t$rt|j|j¦«‚wxYw)Nrz›preventing sending signal to process with PID 0 as it would affect every process in the process group of the calling process (os.getpid()) instead of PID 0T)rƒr©r¤Úkillr7rrVr2r‹r²r­r0r6r.©rŒÚsigs rrÚ _send_signalzProcess._send_signal˜sî€Ø”x !’|�|�| T¤X‘|”|Ð#ØŒx˜1Š}ˆ}å ðEñFôFðFð 9Ý”˜œ #Ñ&Ô&Ð&Ð&Ð&øÝ%ð >ð >ð >Ýð>�z¨$¬(Ñ3Ô3ð>õ(¨¬°$´*¸d¼jÑIÔIÐIà!%�D”JÝ'¨¬°$´*Ñ=Ô=Ð=Ý"ð 9ð 9ð 9Ý" 4¤8¨T¬ZÑ8Ô8Ð8ð 9øøøs ¶AÁB Ccóv—tr| |¦«dS|j |¦«dS)zÚSend a signal *sig* to process pre-emptively checking whether PID has been reused (see signal module constants) . On Windows only SIGTERM is valid and is treated as an alias for kill(). N)rr¦r³Ú send_signalr¤s rrr¨zProcess.send_signal­sB€õ ð (Ø × Ò ˜cÑ "Ô "Ð "Ð "Ð "à ŒJ× "Ò " 3Ñ 'Ô 'Ð 'Ð 'Ð 'rtcóˆ—tr!| tj¦«dS|j ¦«dS)zµSuspend process execution with SIGSTOP pre-emptively checking whether PID has been reused. On Windows this has the effect of suspending all process threads. N)rr¦ÚsignalÚSIGSTOPr³ÚsuspendrÛs rrr¬zProcess.suspend¹sB€õ ð !Ø × Ò �fœnÑ -Ô -Ð -Ð -Ð -à ŒJ× Ò Ñ Ô Ð Ð Ð rtcóˆ—tr!| tj¦«dS|j ¦«dS)z²Resume process execution with SIGCONT pre-emptively checking whether PID has been reused. On Windows this has the effect of resuming all process threads. N)rr¦rªÚSIGCONTr³ÚresumerÛs rrr¯zProcess.resumeÄsB€õ ð Ø × Ò �fœnÑ -Ô -Ð -Ð -Ð -à ŒJ× Ò Ñ Ô Ð Ð Ð rtcóˆ—tr!| tj¦«dS|j ¦«dS)z—Terminate the process with SIGTERM pre-emptively checking whether PID has been reused. On Windows this is an alias for kill(). N)rr¦rªÚSIGTERMr³r£rÛs rrÚ terminatezProcess.terminateÏs@€õ ð Ø × Ò �fœnÑ -Ô -Ð -Ð -Ð -à ŒJ�OŠOÑ Ô Ð Ð Ð rtcóˆ—tr!| tj¦«dS|j ¦«dS)zjKill the current process with SIGKILL pre-emptively checking whether PID has been reused. N)rr¦rªÚSIGKILLr³r£rÛs rrr£z Process.killÚs@€õ ð Ø × Ò �fœnÑ -Ô -Ð -Ð -Ð -à ŒJ�OŠOÑ Ô Ð Ð Ð rtcó¦—|�|dkstd¦«‚|jtur|jS|j |¦«|_|jS)aôWait for process to terminate and, if process is a children of os.getpid(), also return its exit code, else None. On Windows there's no such limitation (exit code is always returned). If the process is already terminated immediately return None instead of raising NoSuchProcess. If *timeout* (in seconds) is specified and process is still alive raise TimeoutExpired. To wait for multiple Process(es) use psutil.wait_procs(). Nrz"timeout must be a positive integer)r©r·r¶r³Úwait)rŒÚtimeouts rrr¶z Process.waitäsS€ð Ð  w°!¢| |ÝÐAÑBÔBÐ BØ Œ>¥Ð *Ð *Ø”>Ð !ØœŸš¨Ñ1Ô1ˆŒØŒ~Ðrtr ©F©NN)r~©T©rž)ErÍrÌÚ __qualname__Ú__doc__r¢r¡rÑÚ__repr__rÖrØrÜÚpropertyrƒÚ contextlibÚcontextmanagerrÊrürrr‰r3r�r¼rr r½r#r¸r'r,rrãr/r1r3ràr€rTr4r:rjrGrHrJr-rMrOrQrRr“r_r]r\rârÚdeprecated_methodr{r}rŠr‹r�r r¦r¨r¬r¯r²r£r¶rnrtrrrTrT*s'€€€€€ððð@ðððð.4ð.4ð.4ð.4ð`HðHðHð0€Hð+ð+ð+ð!ð!ð!ðððð ððñ„Xðð Ôð@.ð@.ñÔð@.ðD*ð*ð*ð*ðXððð& ð ð ðððð2ððñÔðð"ððð>%ð%ð%ðN$ð$ð$ð!ð!ð!ð)ð)ð)ð$!ð!ð!ð ð ð ð'ð'ð'ð'ð ð(à ð %ð %ñ Ô ð %ð  %ð %ð %ð  )ð )ð )ð  (ð (ð (ð€wˆ{Ô" MÑ2Ô2ð ,ð ,ð ,ð ,ð€wˆ{Ô" LÑ1Ô1ð=ð =ð =ð =ð =ð(€wˆ{Ô" HÑ-Ô-ð 7ð 7ð 7ð 7ð 7ð€wˆ{Ô"Ð$6Ñ7Ô7ð=ð =ð =ð =ð =ð&€wˆ{Ô" IÑ.Ô.ð (ð (ð (ð (ð€wˆ{Ô" IÑ.Ô.ð(ð (ð (ð (ð ð,ð ,ð ,ð ,ð -ð-ð-ð (ð(ð(ð€wˆ{Ô" IÑ.Ô.ð(ð (ð (ð (ððCðCðCñÔðCðJZ0ðZ0ðZ0ðZ0ðxð&ð&ñÔð&ðð(ð(ñÔð(ð€WÔ¨=Ð9Ñ9Ô9ð"ð"ñ:Ô9ð"ð-ð-ð-ð 3ð3ð3ð3ð:€wˆ{Ô" MÑ2Ô2ð,ð ,ð ,ð ,ð ,ð6'ð'ð'ð,ð,ð,ð,ð4 ð9ð 9ð 9ð 9ð*ð (ð (ñÔð (ðð!ð!ñÔð!ðð ð ñÔð ðððñÔððððñÔðððððððrtrTcóD—g|]}| d¦«°|dv¯|‘ŒS)Ú_)r¨r¬r¯r²r£r¶r‰rürrr_rjr{rÊ)r rzs rrrsrsüsH€ð$ð$ð$ˆ1 A§L¢L°Ñ$5Ô$5ð$¸!ð#ð;#ð;#€Qð;#ð;#ð;#rtcóB‡—eZdZdZd„Zd„Zd„Zd„Zd„Zd ˆfd„ Z ˆxZ S) rUa Same as subprocess.Popen, but in addition it provides all psutil.Process methods in a single class. For the following methods which are common to both classes, psutil implementation takes precedence: * send_signal() * terminate() * kill() This is done in order to avoid killing another process in case its PID has been reused, fixing BPO-6973. >>> import psutil >>> from subprocess import PIPE >>> p = psutil.Popen(["python", "-c", "print 'hi'"], stdout=PIPE) >>> p.name() 'python' >>> p.uids() user(real=1000, effective=1000, saved=1000) >>> p.username() 'giampaolo' >>> p.communicate() ('hi ', None) >>> p.terminate() >>> p.wait(timeout=2) 0 >>> cót—tj|i|¤Ž|_| |jjd¬¦«dS)NT)rº)Ú subprocessrUÚ_Popen__subprocr¡rƒ©rŒr�rŽs rrr¢zPopen.__init__%s<€õ$Ô)¨4Ð:°6Ð:Ð:ˆŒØ � Š �4”>Ô%°4ˆ Ñ8Ô8Ð8Ð8Ð8rtcó’—tttt¦«ttj¦«z¦«¦«Sr )rCríÚdirrUrÇrÛs rrÚ__dir__z Popen.__dir__,s.€Ý•c�#�e™*œ*¥s­:Ô+;Ñ'<Ô'<Ñ<Ñ=Ô=Ñ>Ô>Ð>rtcób—t|jd¦«r|j ¦«|S)NÚ __enter__)ràrÈrÎrÛs rrrÎzPopen.__enter__/s/€Ý �4”> ;Ñ /Ô /ð 'Ø ŒN× $Ò $Ñ &Ô &Ð &؈ rtcóp—t|jd¦«r|jj|i|¤ŽS|jr|j ¦«|jr|j ¦« |jr|j ¦«| ¦«dS#| ¦«wxYw)NÚ__exit__)ràrÈrÐÚstdoutÚcloseÚstderrÚstdinr¶rÉs rrrÐzPopen.__exit__4s´€Ý �4”> :Ñ .Ô .ð Ø*�4”>Ô*¨DÐ;°FÐ;Ð;Ð ;àŒ{ð $Ø” ×!Ò!Ñ#Ô#Ð#ØŒ{ð $Ø” ×!Ò!Ñ#Ô#Ð#ð à”:ð'Ø”J×$Ò$Ñ&Ô&Ð&ð— ’ ‘ ” � � � ø�— ’ ‘ ” � � øøøs Á) BÂB5cóö— t ||¦«S#t$rQ t |j|¦«cYS#t$r t|jj›d|›d�¦«‚wxYwwxYw)Nz instance has no attribute 'ú')ÚobjectÚ__getattribute__ÚAttributeErrorrÈrËrÍ)rŒr¼s rrrØzPopen.__getattribute__Ds¯€ð HÝ×*Ò*¨4°Ñ6Ô6Ð 6øÝð Hð Hð Hð HÝ×.Ò.¨t¬~¸tÑDÔDÐDÐDÐDøÝ!ð Hð Hð HÝ$Ø(,¬Ô(?Ð(?Ð(?ÀÀÀð&GñHôHðHð Høøøð Høøøs ‚� A8¨A ÁA8Á *A4Á4A8Ncó •—|jj� |jjStt|¦« |¦«}||j_|Sr )rÈÚ returncodeÚsuperrUr¶)rŒr·r‚rËs €rrr¶z Popen.waitNsEø€Ø Œ>Ô $Ð 0Ø”>Ô,Ð ,Ý•E˜4Ñ Ô ×%Ò% gÑ.Ô.ˆØ$'ˆŒÔ!؈ rtr ) rÍrÌr¼r½r¢rÌrÎrÐrØr¶Ú __classcell__)rËs@rrrUrUs•ø€€€€€ððð:9ð9ð9ð?ð?ð?ðððð ððð HðHðHððððððððððrtrUcóV—ttj¦«¦«}|da|S)z&Return a list of current running PIDs.r)rCr€rWrþ©r‚s rrrWrW[s(€õ •Ô!Ñ#Ô#Ñ $Ô $€CØ�a”&€KØ €Jrtcót—|dkrdS|dkrtr|t¦«vStj|¦«S)z“Return True if given PID exists in the current process list. This is faster than doing "pid in psutil.pids()" and should be preferred. rF)rrWr€rV)rƒs rrrVrVcs@€ð  ˆQ‚w€w؈uØ �Šˆ•eˆð •d‘f”fˆ}ÐåÔ% cÑ*Ô*Ð*rtc#ó8‡‡‡ K—ˆˆˆ fd„}ˆ fd„}t ¦«Š tt¦«¦«}t‰  ¦«¦«}||z }||z }|D] }||¦«Œ t t ‰  ¦«¦«t t  |¦« ¦«¦«z¦«} | D]£\}} | €||¦«V—nD|   ¦«r#‰�|   ‰‰¬¦«| _ | V—n ||¦«V—Œ[#t$r||¦«YŒrt$r&| € |‰ vr ‰ |V—n#t$rYnwxYw‚YŒ wxYw ‰ adS#‰ awxYw)aReturn a generator yielding a Process instance for all running processes. Every new Process instance is only created once and then cached into an internal table which is updated every time this is used. Cached Process instances are checked for identity so that you're safe in case a PID has been reused by another process, in which case the cached instance is updated. The sorting order in which processes are yielded is based on their PIDs. *attrs* and *ad_value* have the same meaning as in Process.as_dict(). If *attrs* is specified as_dict() is called and the resulting dict is stored as a 'info' attribute attached to returned Process instance. If *attrs* is an empty list it will retrieve all process info (slow). cóv•—t|¦«}‰�| ‰‰¬¦«|_|‰|j<|S)N©rõrö)rTrürÐrƒ)rƒrrörõÚpmaps €€€rrrWzprocess_iter..add�s;ø€Ý�s‰|Œ|ˆØ Ð ØŸ š ¨5¸8˜ ÑDÔDˆDŒI؈ˆTŒX‰Øˆ rtcó4•—‰ |d¦«dSr )rV)rƒräs €rrÚremovezprocess_iter..remove–sø€Ø �Š��dÑÔÐÐÐrtNrã)Ú_pmapÚcopyrírWÚkeysrCrërÏÚdictÚfromkeysr‰rürÐr0r.r!) rõrörWræÚaÚbÚnew_pidsÚ gone_pidsrƒrúrräs `` @rrrXrXxsøøøèè€ð.ðððððððððððõ �:Š:‰<Œ<€DÝ �D‰FŒF‰ Œ €AÝ ˆD�IŠI‰KŒKÑÔ€AØ�1‰u€HØ�A‘€IØððˆØˆˆs‰ Œ ˆ ˆ ð!Ý •D˜Ÿš™œÑ&Ô&­­d¯mªm¸HÑ.EÔ.E×.KÒ.KÑ.MÔ.MÑ)NÔ)NÑNÑ OÔ OˆØð ð ‰IˆC�ð Ø�<ؘ#˜c™(œ(�N�N�N�Nð —’Ñ(Ô(ð'Ø Ð,Ø(,¯ ª Ø&+°hð)5ñ)@ô)@˜DœIà"˜ ˜ ˜ ˜ à!˜c #™hœh˜˜˜øøÝ ð ð ð Ø��s‘ ” � � � Ýð ð ð ð�< C¨4 K KðØ" 3œi˜˜˜˜øÝ#ðððð˜ðøøøð øøð øøøð# ð>ˆˆˆø�ˆˆ ˆ ˆ ˆ sbÂA/FÃ2AEÅFÅF ÅFÅF Å. E9Å8F Å9 FÆF ÆFÆF Æ FÆ F Æ FÆFcó<‡‡ —ˆˆ fd„}|�|dksd|z}t|¦«‚t¦«Š t|¦«}‰�&t‰¦«stdtz¦«‚|�t ¦«|z}|ri|�|dkrn`|D]V}dt |¦«z }|�4t |t ¦«z |¦«}|dkrn|||¦«ŒJ|||¦«ŒW|‰ z }|°i|r|D]}||d¦«Œ|‰ z }t‰ ¦«t|¦«fS)a,Convenience function which waits for a list of processes to terminate. Return a (gone, alive) tuple indicating which processes are gone and which ones are still alive. The gone ones will have a new *returncode* attribute indicating process exit status (may be None). *callback* is a function which gets called every time a process terminates (a Process instance is passed as callback argument). Function will return as soon as all processes terminate or when *timeout* occurs. Differently from Process.wait() it will not raise TimeoutExpired if *timeout* occurs. Typical use case is: - send SIGTERM to a list of processes - give them some time to terminate - send SIGKILL to those ones which are still alive Example: >>> def on_terminate(proc): ... print("process {} terminated".format(proc)) ... >>> for p in procs: ... p.terminate() ... >>> gone, alive = wait_procs(procs, timeout=3, callback=on_terminate) >>> for p in alive: ... p.kill() cóö•— | |¬¦«}|€| ¦«s-||_‰ |¦«‰� ‰|¦«dSdSdS#t$rYdSt $rYdSwxYw)N)r·)r¶r‰rÛrWr1Ú_SubprocessTimeoutExpired)rr·rÛÚcallbackÚgones €€rrÚ check_gonezwait_procs..check_goneès¬ø€ð #ØŸš¨7˜Ñ3Ô3ˆJð Ð%¨T¯_ª_Ñ->Ô->Ð%à",�”Ø—’˜‘”�ØÐ'Ø�H˜T‘N”N�N�N�Nð(Ð'ð &Ð%øõ ð ð ð Ø ˆDˆDÝ(ð ð ð Ø ˆDˆDð øøøsƒAÁ A8Á+ A8Á7A8Nrz*timeout must be a positive integer, got %szcallback %r is not a callablegð?)r©ríÚcallabler¨rdrðÚminrë) Úprocsr·rórõrˆÚaliveÚdeadlinerÚ max_timeoutrôs ` @rrrYrYÄs‹øø€ðH #ð #ð #ð #ð #ð #ðР7¨a¢< <Ø:¸WÑDˆÝ˜‰oŒoÐÝ ‰5Œ5€DÝ �‰JŒJ€EØÐ¥H¨XÑ$6Ô$6ÐÝÐ7½(ÑBÑCÔCÐCØÐÝ‘8”8˜gÑ%ˆà ðØ Ð  7¨a¢< <Ø Øð .ð .ˆDð¥ E¡ ¤ Ñ*ˆKØÐ"ݘx­&©(¬(Ñ2°[ÑAÔA�ؘa’<�<Ø�EØ� ˜4 Ñ)Ô)Ð)Ð)à� ˜4 Ñ-Ô-Ð-Ð-ؘ‘ ˆð% ðð( ððð ð ˆDØ ˆJ�t˜QÑ Ô Ð Ð Ø˜‘ ˆå �‰JŒJ�˜U™ œ Ð $Ð$rtTcól—|rtj¦«}ntj¦«}|�|dkrd}|S)azReturn the number of logical CPUs in the system (same as os.cpu_count() in Python 3.4). If *logical* is False return the number of physical cores only (e.g. hyper thread CPUs are excluded). Return None if undetermined. The return value is cached after first call. If desired cache can be cleared like this: >>> psutil.cpu_count.cache_clear() Nr)r€Úcpu_count_logicalÚcpu_count_cores)Úlogicalr‚s rrr_r_$sA€ðð,ÝÔ+Ñ-Ô-ˆˆåÔ)Ñ+Ô+ˆØ €˜3 š7˜7ØˆØ €JrtFcóR—|stj¦«Stj¦«S)a�Return system-wide CPU times as a namedtuple. Every CPU time represents the seconds the CPU has spent in the given mode. The namedtuple's fields availability varies depending on the platform: - user - system - idle - nice (UNIX) - iowait (Linux) - irq (Linux, FreeBSD) - softirq (Linux) - steal (Linux >= 2.6.11) - guest (Linux >= 2.6.24) - guest_nice (Linux >= 3.2.0) When *percpu* is True return a list of namedtuples for each CPU. First element of the list refers to first CPU, second element to second CPU and so on. The order of the list is consistent across calls. )r€r\Ú per_cpu_timesrAs rrr\r\;s*€ð, ð+ÝÔ$Ñ&Ô&Ð&åÔ(Ñ*Ô*Ð*rtrAcó‚—t|¦«}tr(|t|dd¦«z}|t|dd¦«z}|S)zWGiven a cpu_time() ntuple calculates the total CPU time (including idle time). ÚguestrÚ guest_nice)Úsumrró)ÚtimesÚtots rrÚ _cpu_tot_timerdsJ€õ ˆe‰*Œ*€CÝ ð /ð �w�u˜g qÑ)Ô)Ñ)ˆØ �w�u˜l¨AÑ.Ô.Ñ.ˆØ €Jrtcó`—t|¦«}||jz}|t|dd¦«z}|S)zlGiven a cpu_time() ntuple calculates the busy CPU time. We do so by subtracting all idle CPU times. Úiowaitr)rÚidleró)rÚbusys rrÚ_cpu_busy_timer ws:€õ ˜Ñ Ô €D؈EŒJÑ€Dð �G�E˜8 QÑ 'Ô 'Ñ'€DØ €Krtcó—|j|jks J||f¦«‚g}tjjD]H}t||¦«t||¦«z }t d|¦«}| |¦«ŒItj|ŽS)Nr)r�r€Ú scputimesróÚmaxr)Út1Út2Ú field_deltasÚfieldÚ field_deltas rrÚ_cpu_times_deltasr‡s‘€Ø Œ:˜œÒ #Ð #Ð # b¨" XÑ #Ô #Ð #Ø€LÝÔ&Ô.ð)ð)ˆÝ˜b %Ñ(Ô(­7°2°uÑ+=Ô+=Ñ=ˆ õ˜!˜[Ñ)Ô)ˆ Ø×Ò˜KÑ(Ô(Ð(Ð(Ý Ô  ,Ð /Ð/rtcó&—|duo|dk}|�|dkrtd|z¦«‚d„}|s[|r#t¦«}tj|¦«nt}|€t¦«}t¦«a||t¦«Sg}|r%td¬¦«}tj|¦«nt }|€td¬¦«}td¬¦«at |t ¦«D]$\}}| |||¦«¦«Œ%|S)a¡Return a float representing the current system-wide CPU utilization as a percentage. When *interval* is > 0.0 compares system CPU times elapsed before and after the interval (blocking). When *interval* is 0.0 or None compares system CPU times elapsed since last call or module import, returning immediately (non blocking). That means the first time this is called it will return a meaningless 0.0 value which you should ignore. In this case is recommended for accuracy that this function be called with at least 0.1 seconds between calls. When *percpu* is True returns a list of floats representing the utilization as a percentage for each CPU. First element of the list refers to first CPU, second element to second CPU and so on. The order of the list is consistent across calls. Examples: >>> # blocking, system-wide >>> psutil.cpu_percent(interval=1) 2.0 >>> >>> # blocking, per-cpu >>> psutil.cpu_percent(interval=1, percpu=True) [2.0, 1.0] >>> >>> # non-blocking (percentage since last call) >>> psutil.cpu_percent(interval=None) 2.9 >>> Nrarrbcó²—t||¦«}t|¦«}t|¦«} ||z dz}t|d¦«S#t$rYdSwxYw)Nrgrra)rrr rkrl)rrÚ times_deltaÚ all_deltaÚ busy_deltaÚ busy_percs rrÚ calculatezcpu_percent..calculateÅsu€Ý'¨¨BÑ/Ô/ˆ Ý! +Ñ.Ô.ˆ Ý# KÑ0Ô0ˆ ð 'Ø# iÑ/°3Ñ6ˆIõ˜ AÑ&Ô&Ð &øõ!ð ð ð Ø�3�3ð øøøs°AÁ AÁATrA)r©r\r•rhÚ_last_cpu_timesÚ_last_per_cpu_timesÚzipr©rmrBrnrrr‚Útot1rs rrr]r]œsJ€ðJ˜tÐ#Ð6¨°3ª€HØÐ ¨1¢   ÝÐ<¸xÑGÑHÔHÐHð 'ð 'ð 'ð ðØ ð !Ý‘”ˆBÝ ŒJ�xÑ Ô Ð Ð å ˆB؈zõ‘[”[�Ý#™+œ+ˆØˆy˜�_Ñ-Ô-Ð-ðˆØ ð .Ý DÐ)Ñ)Ô)ˆDÝ ŒJ�xÑ Ô Ð Ð å&ˆD؈|õ!¨Ð-Ñ-Ô-�Ý'¨tÐ4Ñ4Ô4Ðݘ$Õ 3Ñ4Ô4ð *ð *‰FˆB�Ø �JŠJ�y�y  RÑ(Ô(Ñ )Ô )Ð )Ð )؈ rtcó&—|duo|dk}|�|dkrtd|z¦«‚d„}|s[|r#t¦«}tj|¦«nt}|€t¦«}t¦«a||t¦«Sg}|r%td¬¦«}tj|¦«nt }|€td¬¦«}td¬¦«at |t ¦«D]$\}}| |||¦«¦«Œ%|S)a·Same as cpu_percent() but provides utilization percentages for each specific CPU time as is returned by cpu_times(). For instance, on Linux we'll get: >>> cpu_times_percent() cpupercent(user=4.8, nice=0.0, system=4.8, idle=90.5, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0) >>> *interval* and *percpu* arguments have the same meaning as in cpu_percent(). Nrarrbcó —g}t||¦«}t|¦«}dtd|¦«z }|D]J}||z}t|d¦«}t td|¦«d¦«}| |¦«ŒKt j|ŽS)NgY@rra)rrrrkr÷rr€r)rrr›rrÚscalerÚ field_percs rrrz$cpu_times_percent..calculate s�€ØˆÝ'¨¨BÑ/Ô/ˆ Ý! +Ñ.Ô.ˆ ð �˜A˜yÑ)Ô)Ñ)ˆØ&ð $ð $ˆKØ$ uÑ,ˆJݘz¨1Ñ-Ô-ˆJå�S  jÑ1Ô1°5Ñ9Ô9ˆJØ �KŠK˜ Ñ #Ô #Ð #Ð #ÝÔ$ dÐ+Ð+rtTrA)r©r\r•rhÚ_last_cpu_times_2Ú_last_per_cpu_times_2r rr!s rrr^r^ùsK€ð˜tÐ#Ð6¨°3ª€HØÐ ¨1¢   ÝÐ<¸xÑGÑHÔHÐHð,ð,ð,ð$ ðØ ð !Ý‘”ˆBÝ ŒJ�xÑ Ô Ð Ð å"ˆB؈zõ‘[”[�Ý%™KœKÐØˆy˜Õ.Ñ/Ô/Ð/ðˆØ ð .Ý DÐ)Ñ)Ô)ˆDÝ ŒJ�xÑ Ô Ð Ð å(ˆD؈|õ!¨Ð-Ñ-Ô-�Ý )°Ð 6Ñ 6Ô 6Ðݘ$Õ 5Ñ6Ô6ð *ð *‰FˆB�Ø �JŠJ�y�y  RÑ(Ô(Ñ )Ô )Ð )Ð )؈ rtcó(—tj¦«S)zReturn CPU statistics.)r€r`rnrtrrr`r`>s€å Ô Ñ "Ô "Ð"rtÚcpu_freqcód—tj¦«}|r|Stt|¦«¦«}|dkrdS|dkr|dSd\}}}d}|D]1}||jz }t r |j€d}Œ||jz }||jz }Œ2||z }|rdx} } n ||z } ||z } tj || | ¦«S)a:Return CPU frequency as a namedtuple including current, min and max frequency expressed in Mhz. If *percpu* is True and the system supports per-cpu frequency retrieval (Linux only) a list of frequencies is returned for each CPU. If not a list with one element is returned. rNr)rararaFT) r€r*r…rðÚcurrentrr÷rrÚscpufreq) rBr‚reÚcurrsÚminsÚmaxsÚset_noneÚcpur,Úmin_Úmax_s rrr*r*Esñ€õÔ"Ñ$Ô$ˆØ ð =؈Jå�S ™XœX‘”ˆHؘ1Š}ˆ}Ø�tؘQ’�ؘ1”v� à$1Ñ!��t˜TØ �Øð$ð$�CؘSœ[Ñ(�Eõð! ¤ Ø#'˜Ø ؘCœG‘O�DؘCœG‘O�D�Dà (Ñ*�àð+Ø"&Ð&�D˜4˜4à (™?�DØ (™?�DåÔ'¨°°tÑ<Ô<Ð.pathconfás@€ð Ý”;˜t TÑ*Ô*Ð *øÝ�Ð(ð ð ð Ø ˆDˆDð øøøs ‚—,«,Ú PC_NAME_MAXÚ PC_PATH_MAX)ÚmaxfileÚmaxpath)r€rfrÚ_replaceÚ mountpointr)Úallr;r‚ÚnewÚitemr”s rrrfrfØs˜€ðððõ Ô % cÑ *Ô *€CÝ ð ØˆØð ð ˆDØ—’Ø ˜ ¤°-Ñ@Ô@Ø ˜ ¤°-Ñ@Ô@ðñBôBˆBð �JŠJ�r‰NŒNˆNˆN؈ àˆ rtcóf—trt|¬¦«ni}tjdi|¤Ž}|s|rindS|rt |d¦«}t tdt j¦«}|r$| ¦«D] \}}||Ž||<Œ|S|d„t|  ¦«ŽD¦«ŽS)aØReturn system disk I/O statistics as a namedtuple including the following fields: - read_count: number of reads - write_count: number of writes - read_bytes: number of bytes read - write_bytes: number of bytes written - read_time: time spent reading from disk (in ms) - write_time: time spent writing to disk (in ms) Platform specific: - busy_time: (Linux, FreeBSD) time spent doing actual I/Os (in ms) - read_merged_count (Linux): number of merged reads - write_merged_count (Linux): number of merged writes If *perdisk* is True return the same information for every physical disk installed on the system as a dictionary with partition names as the keys and the namedtuple described above as the values. If *nowrap* is True it detects and adjust the numbers which overflow and wrap (restart from 0) and add "old value" to "new value" so that the returned numbers will always be increasing or remain the same, but never decrease. "disk_io_counters.cache_clear()" can be used to invalidate the cache. On recent Windows versions 'diskperf -y' command may need to be executed first otherwise this function won't find any disk. )ÚperdiskNúpsutil.disk_io_countersÚsdiskioc3ó4K—|]}t|¦«V—ŒdSr ©rrzs rrú z#disk_io_counters.. s(èè€Ð;Ð;˜q•C˜‘F”FÐ;Ð;Ð;Ð;Ð;Ð;rtrn) rrêr€reÚ _wrap_numbersrórrIrÏr Úvalues)rGÚnowraprŽÚrawdictr”ÚdiskÚfieldss rrrereôsÜ€õ@',Ð 3�T˜'Ð "Ñ "Ô "Ð "°€FÝÔ*Ð4Ð4¨VÐ4Ð4€GØ ð'ØÐ&ˆrˆr $Ð&Ø ðDÝ Ð)BÑCÔCˆÝ •˜i­¬Ñ 9Ô 9€BØð=Ø#ŸMšM™OœOð (ð (‰LˆD�&ؘB ˜KˆG�D‰MˆM؈àˆrÐ;Ð;¥C¨¯ªÑ)9Ô)9Ð$:Ð;Ñ;Ô;Ð<Ð.Qs€ÐGÐGÐG¨1¥ A¡¤ÐGÐGÐGrt)r€rarMrÏrÚsnetior rN)ÚpernicrOrPÚnicrRs rrrara-s¨€õ4Ô)Ñ+Ô+€GØ ð&ØÐ%ˆrˆr Ð%Ø ðCÝ Ð)AÑBÔBˆØ ðIØ"Ÿ=š=™?œ?ð 3ð 3‰KˆC�Ý"œ>¨6Ð2ˆG�C‰LˆL؈åŒ~ÐGÐGµ°W·^²^Ñ5EÔ5EÐ0FÐGÑGÔGÐHÐHrtrTržcó*—tj|¦«S)a˜Return system-wide socket connections as a list of (fd, family, type, laddr, raddr, status, pid) namedtuples. In case of limited privileges 'fd' and 'pid' may be set to -1 and None respectively. The *kind* parameter filters for connections that fit the following criteria: +------------+----------------------------------------------------+ | Kind Value | Connections using | +------------+----------------------------------------------------+ | inet | IPv4 and IPv6 | | inet4 | IPv4 | | inet6 | IPv6 | | tcp | TCP | | tcp4 | TCP over IPv4 | | tcp6 | TCP over IPv6 | | udp | UDP | | udp4 | UDP over IPv4 | | udp6 | UDP over IPv6 | | unix | UNIX socket (both UDP and TCP protocols) | | all | the sum of all the possible families and protocols | +------------+----------------------------------------------------+ On macOS this function requires root privileges. )r€rb)r¡s rrrbrbYs€õ4 Ô & tÑ ,Ô ,Ð,rtc óâ—tjdk}|rddl}tj¦«}| d„¬¦«t jt¦«}|D�]\}}}}}} |rr |  |¦«}n[#t$rNtr|dkr tj }n1ttd¦«rtj |kr tj }YnwxYw|tj krEtrdnd } | | ¦«d kr!|d | zz }| | ¦«d k°!|| t#j||||| ¦«¦«�Œt'|¦«S) a*Return the addresses associated to each NIC (network interface card) installed on the system as a dictionary whose keys are the NIC names and value is a list of namedtuples for each address assigned to the NIC. Each namedtuple includes 5 fields: - family: can be either socket.AF_INET, socket.AF_INET6 or psutil.AF_LINK, which refers to a MAC address. - address: is the primary address and it is always set. - netmask: and 'broadcast' and 'ptp' may be None. - ptp: stands for "point to point" and references the destination address on a point to point interface (typically a VPN). - broadcast: and *ptp* are mutually exclusive. Note: you can have more than one address of the same family associated with each interface. )rŽérNcó—|dS)Nrrn)r{s rrr‘znet_if_addrs..Œs €˜q œt€rt)ÚkeyéÿÿÿÿrSú:ú-éz%s00)ÚsysrQÚsocketr€rcÚsortrÈrUrëÚ AddressFamilyr©r-rSràrÚcountrrÚsnicaddrrê) Ú has_enumsrcÚrawlistr‚r¼ÚfamÚaddrÚmaskÚ broadcastÚptpÚ separators rrrcrcvs�€õ$Ô  FÒ*€IØð؈ ˆ ˆ ÝÔ&Ñ(Ô(€GØ ‡L‚L�^�^€LÑ$Ô$Ð$Ý Ô !¥$Ñ 'Ô '€CØ18ðLñLÑ-ˆˆc�4˜˜y¨#Ø ð .ð .Ø×*Ò*¨3Ñ/Ô/��øÝð .ð .ð .Ýð.˜s bšy˜yÝ%Ô-�C�CÝ�k¨9Ñ5Ô5ð.Ý#Ô+¨sÒ2Ð2õ&Ô-�Cøøð .øøøð •+Ô%Ò %Ð %õ %Ð-˜˜¨#ˆIØ—*’*˜YÑ'Ô'¨!Ò+Ð+ؘ Ñ*Ñ*�ð—*’*˜YÑ'Ô'¨!Ò+Ð+à ˆDŒ ×Ò�Ô)¨#¨t°T¸9ÀcÑJÔJÑKÔKÐKÑKÝ �‰9Œ9ÐsÁ)A?Á?ACÃCcó(—tj¦«S)aReturn information about each NIC (network interface card) installed on the system as a dictionary whose keys are the NIC names and value is a namedtuple with the following fields: - isup: whether the interface is up (bool) - duplex: can be either NIC_DUPLEX_FULL, NIC_DUPLEX_HALF or NIC_DUPLEX_UNKNOWN - speed: the NIC speed expressed in mega bits (MB); if it can't be determined (e.g. 'localhost') it will be set to 0. - mtu: the maximum transmission unit expressed in bytes. )r€rdrnrtrrrdrd¦s€õ Ô #Ñ %Ô %Ð%rtÚsensors_temperaturesc ó°‡—ˆfd„}tjt¦«}tj¦«}| ¦«D]�\}}|rz| d¦«\}}}} ||¦«}||¦«}|| ¦«} |r| s|} n| r|s| }|| tj |||| ¦«¦«|°zŒ‚t|¦«S)a<Return hardware temperatures. Each entry is a namedtuple representing a certain hardware sensor (it may be a CPU, an hard disk or something else, depending on the OS and its configuration). All temperatures are expressed in celsius unless *fahrenheit* is set to True. cóD•—|�‰rt|¦«dzdz dzn|SdS)Né raé )r…)ÚnÚ fahrenheits €rrÚconvertz%sensors_temperatures..convertÅs3ø€Øˆ}Ø2<ÐC�˜a™œ 1™  qÑ(¨BÑ.Ð.À!ÐCðˆ}rtr) rÈrUrër€rqrÏrVrrÚshwtemprê) rwrxr‚rPr¼rNÚlabelr,ÚhighÚcriticals ` rrrqrq½s ø€ð Dð Dð Dð Dð DõÔ%¥dÑ+Ô+ˆÝÔ2Ñ4Ô4ˆà#ŸMšM™OœOð Eð E‰LˆD�&Øð EØ17·²¸A±´Ñ.��w  hØ!˜' 'Ñ*Ô*�Ø�w˜t‘}”}�Ø"˜7 8Ñ,Ô,�àð$ ð$Ø#�H�HØð$ dð$Ø#�Dà�D” × Ò Ý”O E¨7°D¸(ÑCÔCñEôEðEðð Eøõ�C‰yŒyÐrtÚ sensors_fanscó(—tj¦«S)z¢Return fans speed. Each entry is a namedtuple representing a certain hardware sensor. All speed are expressed in RPM (rounds per minute). )r€r}rnrtrrr}r}ãs€õ Ô'Ñ)Ô)Ð)rtÚsensors_batterycó(—tj¦«S)ažReturn battery information. If no battery is installed returns None. - percent: battery power left as a percentage. - secsleft: a rough approximation of how many seconds are left before the battery runs out of power. May be POWER_TIME_UNLIMITED or POWER_TIME_UNLIMITED. - power_plugged: True if the AC power cable is connected. )r€rrnrtrrrrðs€õÔ*Ñ,Ô,Ð,rtcó(—tj¦«S)zAReturn the system boot time expressed in seconds since the epoch.)r€rirnrtrrriri s€õ Ô Ñ "Ô "Ð"rtcó(—tj¦«S)a„Return users currently connected on the system as a list of namedtuples including the following fields. - user: the name of the user - terminal: the tty or pseudo-tty associated with the user, if any. - host: the host name associated with the entry, if any. - started: the creation time as a floating point number expressed in seconds since the epoch. )r€rhrnrtrrrhrh s€õ Ô Ñ Ô Ðrtcó(—tj¦«S)zjReturn a generator yielding a WindowsService instance for all Windows services installed. )r€Úwin_service_iterrnrtrrr„r„ s€õÔ+Ñ-Ô-Ð-rtcó*—tj|¦«S)zjGet a Windows service by *name*. Raise NoSuchProcess if no service with such name exists. )r€Úwin_service_get)r¼s rrr†r†% s€õÔ*¨4Ñ0Ô0Ð0rtcó˜—ddl}t|¦«|j_tj t|¦«¦«dS)zZEnable or disable PSUTIL_DEBUG option, which prints debugging messages to stderr. rN)Úpsutil._commonÚboolrÚ PSUTIL_DEBUGr€ÚcextÚ set_debug)r+Úpsutils rrÚ _set_debugrŽ/ sC€ðÐÐÐÝ"& u¡+¤+€F„NÔÝÔ×Ò�t E™{œ{Ñ+Ô+Ð+Ð+Ð+rtc óÔ—ddlm}ddlm}tj ¦«}d}gd¢}t|dz¦«t|d¬¦«D�]’}|j drntj  |j d¦«}| ¦«|kr|  d ¦«}n|  d ¦«}nd }|j d r@tj d tj t|j d ¦«¦«¦«}nd }|j dpd }|s3tr, | ¦«d}n#t"$rYnwxYw|r&t$rd|vr| d¦«d}|dd…}|j d�||j dj¦«nd } |j d�||j dj¦«nd } |j d�t-|j dd¦«nd } |j drt/|j d¦«nd } |j dr!d |j d¦«} n |j d} |j dr|j ddd…nd }||dd…|j d| | | | |||| f z}t|d|¦«d…¦«�Œ”dS)Nr)Ú bytes2human)Úget_terminal_sizez)%-10s %5s %5s %7s %7s %5s %6s %6s %6s %s) rƒrŠr¼r r\r¸râr½r,r#) ÚUSERÚPIDz%MEMÚVSZÚRSSÚNICEÚSTATUSÚSTARTÚTIMEÚCMDLINE)rör¸z%H:%Mz%b%drwr\z%M:%Sr#rú\rtrârŠr,r rér¼r½raé rƒ)rr�Ú_compatr‘r–ÚdateÚtodayÚprintrXrÐr—r˜r•Ú localtimerrrãr/r-ÚsplitÚvmsr~rkrorÎ)r�r‘Ú today_dayÚtemplrõÚprÚcputimerir£r~Úmempr,r r½Úlines rrÚtestrª8 sW€Ø$Ð$Ð$Ð$Ð$Ð$Ø*Ð*Ð*Ð*Ð*Ð*å” ×#Ò#Ñ%Ô%€IØ 7€Eð Ið Ið I€Eå ˆ%ð9ñ 9ñ:ô:ð:å ˜%¨$Ð /Ñ /Ô /ð0-ñ0-ˆØ Œ6�-Ô ð ÝÔ%×3Ò3°A´F¸=Ô4IÑJÔJˆEØ�zŠz‰|Œ|˜yÒ(Ð(ØŸš wÑ/Ô/��àŸš vÑ.Ô.��àˆEØ Œ6�+Ô ð Ý”m GÝ$(¤Nµ3°q´v¸kÔ7JÑ3KÔ3KÑ$LÔ$LñNôNˆGˆGðˆGàŒv�jÔ!Ð' RˆØð �ð ð Ø—v’v‘x”x ”{��øÝð ð ð Ø�ð øøøà ð '•Gð ' ¨    Ø—:’:˜dÑ#Ô# AÔ&ˆDØ�B�Q�BŒxˆà ŒF�=Ô !Ð -ðˆk˜!œ& Ô/Ô3Ñ4Ô4Ð4Ø35ð ð ŒF�=Ô !Ð -ðˆk˜!œ& Ô/Ô3Ñ4Ô4Ð4Ø35ð ð ŒFÐ#Ô $Ð 0õ�Q”VÐ,Ô-¨qÑ1Ô1Ð1Ø68ð à&'¤f¨V¤nÐ<�s�1”6˜&”>Ñ"Ô"Ð"¸"ˆØ Œ6�)Ô ð %Ø—h’h˜qœv iÔ0Ñ1Ô1ˆGˆGà”f˜V”nˆGØ)*¬°Ô)9ÐA�”˜Ô! " 1 "Ô%Ð%¸rˆàØ ��"�ŒIØ ŒF�5ŒMØ Ø Ø Ø Ø Ø Ø Ø ð ñ ˆõ ˆdÐ*Ð%Ð%Ñ'Ô'¨Ô*Ð*Ô+Ñ,Ô,Ð,Ñ,ða0-ð0-sÄ<EÅ E$Å#E$rŽÚ__main__r¹rºr¸)NF)FTr»)¸r½Ú __future__rrÈrÀr–r‘r¤rªrÇrbr¯r•rrrwrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4rMr�r5r¦r6r7r8ròr9Ú PROCFS_PATHr:r€r;r<r=r>r?Ú_psutil_windowsr@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrôÚplatformÚ__all__ÚextendÚ__extra__all__ràrTrkÚglobalsÚ_globalsr‹rËr ÚisupperrórrSÚ __author__rRrìr¢rQrdrƒrþr×r¶roÚreplacer‹r}rˆrÎr"rxr~r„r“r�rírêrUrWrVrçrXrYr_r\rÚ Exceptionrrr rr]r'r(r^r`r*r5rZr[rgrfreÚpartialÚ cache_clearrarbrcrdrqr}rrirhr„r†rŽrªrqr{rÍrnrtrrúr»s3ðððð  ÐÐÐÐÐàÐÐÐØÐÐÐØ€€€ØÐÐÐØ € € € Ø € € € ØÐÐÐØ € € € ØÐÐÐØ € € € ðØ€J€J€J€JøØðððØ €C€C€CðøøøðÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ$Ð$Ð$Ð$Ð$Ð$Ø!Ð!Ð!Ð!Ð!Ð!Ø%Ð%Ð%Ð%Ð%Ð%Ø#Ð#Ð#Ð#Ð#Ð#Ø#Ð#Ð#Ð#Ð#Ð#Ø"Ð"Ð"Ð"Ð"Ð"Ø Ð Ð Ð Ð Ð ØÐÐÐÐÐØ"Ð"Ð"Ð"Ð"Ð"Ø"Ð"Ð"Ð"Ð"Ð"Ø#Ð#Ð#Ð#Ð#Ð#ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ$Ð$Ð$Ð$Ð$Ð$Ø$Ð$Ð$Ð$Ð$Ð$Ø'Ð'Ð'Ð'Ð'Ð'ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ'Ð'Ð'Ð'Ð'Ð'Ø)Ð)Ð)Ð)Ð)Ð)Ø Ð Ð Ð Ð Ð Ø&Ð&Ð&Ð&Ð&Ð&Ø Ð Ð Ð Ð Ð Ø"Ð"Ð"Ð"Ð"Ð"Ø"Ð"Ð"Ð"Ð"Ð"Ø#Ð#Ð#Ð#Ð#Ð#Ø$Ð$Ð$Ð$Ð$Ð$Ø#Ð#Ð#Ð#Ð#Ð#Ø(Ð(Ð(Ð(Ð(Ð(Ø#Ð#Ð#Ð#Ð#Ð#Ø"Ð"Ð"Ð"Ð"Ð"Ø"Ð"Ð"Ð"Ð"Ð"ØÐÐÐÐÐØÐÐÐÐÐØ!Ð!Ð!Ð!Ð!Ð!ØÐÐÐÐÐØ"Ð"Ð"Ð"Ð"Ð"Ø#Ð#Ð#Ð#Ð#Ð#Ø"Ð"Ð"Ð"Ð"Ð"Ø+Ð+Ð+Ð+Ð+Ð+Ø2Ð2Ð2Ð2Ð2Ð2Ø Ð Ð Ð Ð Ð Ø$Ð$Ð$Ð$Ð$Ð$Ø'Ð'Ð'Ð'Ð'Ð'ØJÐJÐJÐJÐJÐJØÐÐÐÐÐð ð0Mð€Kà)Ð)Ð)Ð)Ð)Ð)Ø)Ð)Ð)Ð)Ð)Ð)Ø+Ð+Ð+Ð+Ð+Ð+Ø+Ð+Ð+Ð+Ð+Ð+Ø)Ð)Ð)Ð)Ð)Ð)Ð)à ð%MØ+Ð+Ð+Ð+Ð+Ð+Ø<Ð<Ð<Ð<Ð<Ð<Ø<Ð<Ð<Ð<Ð<Ð<Ø4Ð4Ð4Ð4Ð4Ð4Ø4Ð4Ð4Ð4Ð4Ð4Ø6Ð6Ð6Ð6Ð6Ð6Ø8Ð8Ð8Ð8Ð8Ð8Ø+Ð+Ð+Ð+Ð+Ð+Ø'Ð'Ð'Ð'Ð'Ð'Ø&Ð&Ð&Ð&Ð&Ð&Ø)Ð)Ð)Ð)Ð)Ð)Ø*Ð*Ð*Ð*Ð*Ð*Ð*à ðMØ'Ð'Ð'Ð'Ð'Ð'Ð'àðMØ'Ð'Ð'Ð'Ð'Ð'Ð'à ðMØ)Ð)Ð)Ð)Ð)Ð)Ø$Ð$Ð$Ð$Ð$Ð$Ø#Ð#Ð#Ð#Ð#Ð#ð€K€KàðMØ'Ð'Ð'Ð'Ð'Ð'ð€K€Kð Ð Ð<¸s¼|ÑKÑ LÔ LÐLð- ð- ð- €ð`‡‚ˆ{Ô)Ñ*Ô*Ð*ð €7ˆ;Ô  Ñ)Ô)ð àÐÐÐÐÐàˆw‰yŒy€HØ €EØ��]Ñ#Ô#ð"ð"ˆØ × Ò ˜FÑ #Ô #ð "¨¯ ª ©¬ð "Ø%˜g m°UÑ;Ô;ˆH�U‰OØ �NŠN˜5Ñ !Ô !Ð !øØ�%à Ô €à € Ø€ ؈uÐAÐA¨+×*;Ò*;¸CÑ*@Ô*@ÐAÑAÔAÑBÔB€ à ˆ��{ D¤IÑ .Ô .€Ø€ Ø€ Ø ˆF‰HŒH€ ð€Cˆ ×Ò˜C Ñ$Ô$Ñ%Ô%؈� Ô  )¨TÑ2Ô2ò3ð3ð Ø +Ô 0Ô 9ñ :€Cà€wˆ{Ô Ñ+Ô+ð4Ø ˆØ �HŠHÐ?Ð?   [Ô%5Ô%=Ñ!>Ô!>Ð?Ñ?Ô?Ñ @Ô @Ð @Ð @À+À+À+ðOñ Oˆˆð Ð%¨ Ñ3Ñ3ˆØÐ H؈� Ô  *Ø7ñ 9ô 9ñ :ñ:€CðÐ >Ñ>€CØ ˆ+�cÑ Ô Ðð €7ˆ;˜ Ñ#Ô#ðàÔ$€I€Ið ð ð ð ð ð ð ?ð?ð?ð MðMðMðMðMˆfñMôMðMðb�Sð$ð$���G‘ ” ð$ñ$ô$ñ%ô%ÐðLðLðLðLðLˆGñLôLðLðhððð+ð+ð+ð$ €ðIðIðIðIðXX%ðX%ðX%ðX%ð@ðððð.+ð+ð+ð+ð8Ø�i‘k”k€O€OøØðððà€O€O€OðøøøðØ#˜)¨4Ð0Ñ0Ô0ÐÐøØðððàÐÐÐðøøøð ððð& ð ð ð 0ð0ð0ð*SðSðSðSör$ÐÞ+ÐðBðBðBðBðJ#ð#ð#ð  €7ˆ;˜ Ñ#Ô#ð*ð&=ð&=ð&=ð&=ðP ‡N‚N�:ÑÔÐð €7ˆ2ˆ|ÑÔð!  ¨ °\Ñ BÔ Bð!ð€wˆr�<Ñ Ô ð,Ø”]ˆ ˆ à Ô+ˆ à ‡N‚N�<Ñ Ô Ð ð8ð8ð8ðv %ð %ð %ð*(ð(ð(ððððð8,=ð,=ð,=ð,=ð^ 1˜yÔ0ØÔÐ8ñ :ô :ÐÔà'EÐÔÔ$ð$Ið$Ið$Ið$IðN0˜iÔ/ØÔÐ7ñ9ô9€Ôà&D€ÔÔ#ð-ð-ð-ð-ð:-ð-ð-ð` &ð &ð &ð* €7ˆ;Ð.Ñ/Ô/ð"+ððððð@ ‡N‚NÐ)Ñ*Ô*Ð*ð €7ˆ;˜Ñ'Ô'ð #ð*ð*ð*ð ‡N‚N�>Ñ"Ô"Ð"ð €7ˆ;Ð)Ñ*Ô*ð&ð -ð -ð -ð ‡N‚NÐ$Ñ%Ô%Ð%ð#ð#ð#ð ð ð ð$ ð 1ð.ð.ð.ð 1ð1ð1ð,ð,ð,ð:-ð:-ð:-ðz˜HØÔ�AÔ˜ÒÐØ ˆQà ˆzÒÐØ€D�F„F€F€F€FðÐs3²7·AÁAÑ Q#Ñ#Q-Ñ,Q-Ñ1 Q>Ñ>RÒR