name : __init__.pyc
�
�?�Vc8@ s�	dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZyddlZWne
k
r�eZnXddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"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#lm0Z0e	j1j2d$�r�d%Z3dd&lm4Z5dd'l4m6Z6dd(l4m7Z7dd)l4m8Z8dd*l4m9Z9e5j:r�dd+l;m<Z<dd,l;m=Z=dd-l;m>Z>dd.l;m?Z?dd/l;m@Z@dd0l;mAZAdd1l;mBZBdd2l;mCZCdd3l;mDZDdd4l;mEZEdd5l;mFZFdd6l;mGZGdd7lm;Z;y
e;jHZHWneIk
r�nXy
e;jJZJWneIk
rnXy
e;jKZKWneIk
r?nXy
e;jLZLWneIk
r`nXy
e;jMZMWneIk
r�nXnnae	j1j2d8�rdd9lmNZ5dd:lOmPZPdd;lOmQZQdd<lOmRZRdd=lOmSZSdd>lOmTZTdd?lOmUZUdd@lNmVZVn�e	j1j2dA�rBddBlmWZ5n�e	j1j2dC�pue	j1j2dD�pue	j1j2dE�r�ddFlmXZ5n^e	j1j2dG�r�ddHlmYZ5ddIlYmZZZddJlYm[Z[d%Z3ne\dKe	j1��dLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d\d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�g8Z]e]j^e5j_�d�Z`d�Zaebgeajcd��D]Zdeeed�^q��Zfe5jgZgeahejid�kZjejid�kZke	j1j2dD�Zleme
d�e
j
�Zneeeajod�d���eme5jpd�e�kr�d�e5jpjqeafZre
er��ndLesfd���YZtdMetfd���YZudNeufd���YZvdOetfd���YZwdPetfd���YZxeue5_ueve5_vewe5_wexe5_xd��Zydnezfd���YZ{doe{fd���YZ|d��Z}d��Z~iZd��Z�eed��Z�ee�d���Z�e�d��Z�y
e��a�Wn!esk
r�ea�ej��nXye�d�e��a�Wn!esk
r	ea�ej��nXee�d��Z�t�a�t�a�ee�d��Z�d��Z�d��Z�d��Z�e�d��Z�e�d��Z�e�d��Z�d�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�[[e	jfd�d�fkr�	[dne�d�kr�	e��ndS(�s�psutil is a cross-platform library for retrieving information on
running processes and system utilization (CPU, memory, disks, network)
in Python.
i����(tdivisionNi(t_common(tmemoize(tcallable(tlong(tPY3(tSTATUS_DEAD(tSTATUS_DISK_SLEEP(tSTATUS_IDLE(t
STATUS_LOCKED(tSTATUS_RUNNING(tSTATUS_SLEEPING(tSTATUS_STOPPED(tSTATUS_TRACING_STOP(tSTATUS_WAITING(t
STATUS_WAKING(t
STATUS_ZOMBIE(t
CONN_CLOSE(tCONN_CLOSE_WAIT(tCONN_CLOSING(tCONN_ESTABLISHED(tCONN_FIN_WAIT1(tCONN_FIN_WAIT2(t
CONN_LAST_ACK(tCONN_LISTEN(t	CONN_NONE(t
CONN_SYN_RECV(t
CONN_SYN_SENT(tCONN_TIME_WAIT(tNIC_DUPLEX_FULL(tNIC_DUPLEX_HALF(tNIC_DUPLEX_UNKNOWNtlinuxs/proc(t_pslinux(tIOPRIO_CLASS_BE(tIOPRIO_CLASS_IDLE(tIOPRIO_CLASS_NONE(tIOPRIO_CLASS_RT(t
RLIM_INFINITY(t	RLIMIT_AS(tRLIMIT_CORE(t
RLIMIT_CPU(tRLIMIT_DATA(tRLIMIT_FSIZE(tRLIMIT_LOCKS(tRLIMIT_MEMLOCK(t
RLIMIT_NOFILE(tRLIMIT_NPROC(t
RLIMIT_RSS(tRLIMIT_STACK(t
_psutil_linuxtwin32(t
_pswindows(tABOVE_NORMAL_PRIORITY_CLASS(tBELOW_NORMAL_PRIORITY_CLASS(tHIGH_PRIORITY_CLASS(tIDLE_PRIORITY_CLASS(tNORMAL_PRIORITY_CLASS(tREALTIME_PRIORITY_CLASS(tCONN_DELETE_TCBtdarwin(t_psosxtfreebsdtopenbsdtnetbsd(t_psbsdtsunos(t_pssunos(t
CONN_BOUND(t	CONN_IDLEsplatform %s is not supportedtErrort
NoSuchProcesst
ZombieProcesstAccessDeniedtTimeoutExpiredtversion_infot__version__R
RRRRR
RRRR	RRRRRRRRRRRRRtAF_LINKRRRtProcesstPopent
pid_existstpidstprocess_itert
wait_procstvirtual_memorytswap_memoryt	cpu_timestcpu_percenttcpu_times_percentt	cpu_counttnet_io_counterstnet_connectionstnet_if_addrstnet_if_statstdisk_io_counterstdisk_partitionst
disk_usagetuserst	boot_timesGiampaolo Rodola's3.4.2t.tposixtntt	monotonicttversionscversion conflict: %r C extension module was built for another version of psutil (different than %s)cB s)eZdZdd�Zd�ZeZRS(sQBase exception class. All other psutil exceptions inherit
    from this one.
    RgcC s
||_dS(N(tmsg(tselfRi((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__init__�scC s,d|jj|jj|jf}|j�S(Ns%s.%s %s(t	__class__t
__module__t__name__Ritstrip(Rjtret((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__repr__�s(RnRmt__doc__RkRqt__str__(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRF�s	cB seZdZddd�ZRS(sXException raised when a process with a certain PID doesn't
    or no longer exists.
    cC s}tj||�||_||_||_|dkry|r\d|jt|j�f}n
d|j}d||_ndS(Ns(pid=%s, name=%s)s(pid=%s)sprocess no longer exists (RFRktpidtnameRitNonetrepr(RjRtRuRitdetails((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRk�s			
N(RnRmRrRvRk(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRG�scB s eZdZdddd�ZRS(s/Exception raised when querying a zombie process. This is
    raised on OSX, BSD and Solaris only, and not always: depending
    on the query the OS may be able to succeed anyway.
    On Linux all zombie processes are querable (hence this is never
    raised). Windows doesn't have zombie processes.
    cC s�tj||�||_||_||_||_|dkr�|rq|rqd|jt|j�|jf}n2|r�d|jt|j�f}n
d|j}d||_ndS(Ns(pid=%s, name=%s, ppid=%s)s(pid=%s, name=%s)s(pid=%s)s'process still exists but it's a zombie (RFRkRttppidRuRiRvRw(RjRtRuRyRiRx((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRk�s				"
N(RnRmRrRvRk(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRH�scB s eZdZdddd�ZRS(s@Exception raised when permission to perform an action is denied.cC s�tj||�||_||_||_|dkr�|dk	rk|dk	rkd|t|�f|_q�|dk	r�d|j|_q�d|_ndS(Ns(pid=%s, name=%s)s(pid=%s)Rg(RFRkRtRuRiRvRw(RjRtRuRi((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRks			N(RnRmRrRvRk(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRIscB seZdZddd�ZRS(sWRaised on Process.wait(timeout) if timeout expires and process
    is still alive.
    cC s�tj|d|�||_||_||_|dk	ri|dk	ri|jd|t|�f7_n%|dk	r�|jd|j7_ndS(Nstimeout after %s secondss (pid=%s, name=%s)s	 (pid=%s)(RFRktsecondsRtRuRvRiRw(RjRzRtRu((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRks			"N(RnRmRrRvRk(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRJsc s"tj���fd��}|S(spDecorator which raises NoSuchProcess in case a process is no
    longer running or its PID has been reused.
    c s4|j�s$t|j|j��n�|||�S(N(t
is_runningRGRtt_name(Rjtargstkwargs(tfun(sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytwrapper3s(t	functoolstwraps(RR�((RsQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt_assert_pid_not_reused/scB s�eZdZd7d�Zed�Zd�Zd�Zd�Z	d�Z
d�Zd7d7d�Zd	�Z
d
�Zed��Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd7d�Zerd�Zd�Zd�Zd�Znee j!d�r d�Z"nee j!d�rDd7d7d�Z#nee j!d�red7d�Z$nee j!d�r�d7d �Z%ne&r�d!�Z'nd"�Z(d#�Z)d$�Z*e+ed%��Z,d7d&�Z-d'�Z.d(�Z/d)�Z0d*�Z1ee j!d+�re2d,�Z3nd-�Z4d.d/�Z5er=d0�Z6ne+d1��Z7e+d2��Z8e+d3��Z9e+d4��Z:e+d5��Z;d7d6�Z<RS(8s-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
    cC s|j|�dS(N(t_init(RjRt((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRk\scC sV|dkrtj�}nOtrKt|ttf�rKtd|��n|dkrjtd|��n||_	d|_
d|_d|_t
|_d|_d|_tj|�|_d|_d|_y|j�Wn_tk
r�nOtk
r�n?tk
r<|s0d|}t|d|��q=t|_nX|j|jf|_dS(Nspid must be an integer (got %r)is'pid must be a positive integer (got %s)sno process found with pid %s(Rvtostgetpidt_PY3t
isinstancetintRt	TypeErrort
ValueErrort_pidR|t_exet_create_timetFalset_gonet_hasht_ppidt_psplatformRNt_proct_last_sys_cpu_timest_last_proc_cpu_timestcreate_timeRIRHRGtTrueRtt_ident(RjRtt_ignore_nspRi((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�_s:
									




cC s�y|j}t|j��}WnXtk
r?d|j}nKtk
r\d|j}n.tk
ryd|j}nXd||f}d|jj|jj|fS(Ns(pid=%s (zombie))s(pid=%s (terminated))s(pid=%s)s(pid=%s, name=%s)s%s.%s%s(	RtRwRuRHRGRIRlRmRn(RjRtRuRx((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRs�s	


cC sd|j�t|�fS(Ns
<%s at %s>(Rstid(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRq�scC s#t|t�stS|j|jkS(N(R�RNtNotImplementedR�(Rjtother((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__eq__�scC s||kS(N((RjR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__ne__�scC s+|jdkr$t|j�|_n|jS(N(R�RvthashR�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__hash__�sc
C stddddddddd	d
dg�}t�}t|p[gt|�D]}|^qL�}x�|D]�}|jd�r�qhn||kr�qhny1t||�}t|�r�|�}	n|}	Wn<ttfk
r�|}	n tk
r|rh�qhqhnX|	||<qhW|S(
s�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.
        tsend_signaltsuspendtresumet	terminatetkilltwaitR{tas_dicttparenttchildrentrlimitt_(	tsettdicttdirt
startswithtgetattrRRIRHtNotImplementedError(
Rjtattrstad_valuetexcluded_namestretdicttxtlsRutattrRp((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��s.
	+

	
cC se|j�}|dk	ra|j�}y&t|�}|j�|krI|SWqatk
r]qaXndS(s�Return the parent process as a Process object pre-emptively
        checking whether PID has been reused.
        If no parent is known return None.
        N(RyRvR�RNRG(RjRytctimeR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��s
cC sW|jr
tSy|t|j�kSWn,tk
r8tStk
rRt|_tSXdS(s�Return whether this process is running.
        It also checks if PID has been reused by another process in
        which case return False.
        N(R�R�RNRtRHR�RG(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR{�s	

	cC s|jS(sThe process PID.(R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRtscC s9tr|jj�S|jp(|jj�|_|jSdS(s`The process parent PID.
        On Windows the return value is cached after first call.
        N(t_POSIXR�RyR�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRys
cC s�tr|jdk	r|jS|jj�}tr�t|�dkr�y|j�}Wntk
rfq�X|r�t	j
j|d�}|j|�r�|}q�q�n||_||j_|S(s>The process name. The return value is cached after first call.iiN(
t_WINDOWSR|RvR�RuR�tlentcmdlineRIR�tpathtbasenameR�(RjRuR�t
extended_name((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRus
	c s��fd�}�jdkr�y�jj�}Wntk
rP}|d|�SX|s�y|d|�}Wq�tk
r}q�Xn|�_n�jS(s�The process executable as an absolute path.
        May also be an empty string.
        The return value is cached after first call.
        c s��j�}|rzttd�rzttd�rz|d}tjj|�rztjj|�rztj|tj�rz|Snt|t	�r�|�n|S(NtaccesstX_OKi(
R�thasattrR�R�tisabstisfileR�R�R�RI(tfallbackR�texe(Rj(sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytguess_it7s$
	R�N(R�RvR�R�RI(RjR�R�terr((RjsQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�2s
cC s
|jj�S(s3The command line this process has been called with.(R�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�YscC s*y|jj�SWntk
r%tSXdS(s2The process current status as a STATUS_* constant.N(R�tstatusRHR(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�]s
cC sstrbtdkr!td��n|j�j}ytj|�jSWqotk
r^t	|�SXn
|j
j�SdS(stThe name of the user that owns the process.
        On UNIX this is calculated by using *real* process uid.
        s0requires pwd module shipped with standard pythonN(R�tpwdRvtImportErrortuidstrealtgetpwuidtpw_nametKeyErrortstrR�tusername(Rjtreal_uid((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�ds
cC s+|jdkr$|jj�|_n|jS(s�The process creation time as a floating point number
        expressed in seconds since the epoch, in UTC.
        The return value is cached after first call.
        N(R�RvR�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�vscC s
|jj�S(s6Process current working directory as an absolute path.(R�tcwd(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�scC sQ|dkr|jj�S|j�s=t|j|j��n|jj|�dS(s'Get or set process niceness (priority).N(RvR�tnice_getR{RGRtR|tnice_set(Rjtvalue((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytnice�s

cC s
|jj�S(sVReturn process UIDs as a (real, effective, saved)
            namedtuple.
            (R�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(sVReturn process GIDs as a (real, effective, saved)
            namedtuple.
            (R�tgids(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(sVThe terminal associated with this process, if any,
            else None.
            (R�tterminal(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(scReturn the number of file descriptors opened by this
            process (POSIX only).
            (R�tnum_fds(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��stio_counterscC s
|jj�S(s
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�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��st
ionice_getcC sK|dkr4|dk	r'td��n|jj�S|jj||�SdS(s�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.
            s$'ioclass' argument must be specifiedN(RvR�R�R�t
ionice_set(RjtioclassR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytionice�s

R�cC s3|dkr|jj|�S|jj||�SdS(s"Get or set process resource limits as a (soft, hard)
            tuple.

            'resource' is one of the RLIMIT_* constants.
            'limits' is supposed to be a (soft, hard)  tuple.

            See "man prlimit" for further info.
            Available on Linux only.
            N(RvR�R�(Rjtresourcetlimits((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��s
tcpu_affinity_getcC sE|dkr%tt|jj���S|jjtt|���dS(s�Get or set process CPU affinity.
            If specified 'cpus' must be a list of CPUs for which you
            want to set the affinity (e.g. [0, 1]).
            (Windows, Linux and BSD only).
            N(RvtlistR�R�R�tcpu_affinity_set(Rjtcpus((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytcpu_affinity�s	cC s
|jj�S(s\Return the number of handles opened by this process
            (Windows only).
            (R�tnum_handles(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(skReturn the number of voluntary and involuntary context
        switches performed by this process.
        (R�tnum_ctx_switches(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(s2Return the number of threads used by this process.(R�tnum_threads(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s
|jj�S(s�Return threads opened by process as a list of
        (id, user_time, system_time) namedtuples representing
        thread id and thread CPU times (user/system).
        On OpenBSD this method requires root access.
        (R�tthreads(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��scC s�ttd�rtj�}nd}g}|s5|dkr�x�t�D]d}yD|j�|jkr�|j�|j�kr�|j|�q�nWqFt	t
fk
r�qFXqFWq�x�|j�D]p\}}||jkr�y8t|�}|j�|j�kr|j|�nWq.t	t
fk
r*q.Xq�q�Wn_t
jt�}|dkr�x�t�D];}y||j�j|�WqZt	t
fk
r�qZXqZWnXxU|j�D]G\}}y!t|�}||j|�Wq�t	t
fk
r�q�Xq�W|jg}	x�|	D]�}x�||D]t}y|j�|j�k}
Wnt	t
fk
rSqX|
r|j|�|j|	kr�|	j|j�q�qqWqW|S(s&Return the children of this process as a list of Process
        instances, pre-emptively checking whether PID has been reused.
        If recursive is True return all the parent descendants.

        Example (A == this process):

         A ─┐
            │
            ├─ B (child) ─┐
            │             └─ X (grandchild) ─┐
            │                                └─ Y (great grandchild)
            ├─ C (child)
            └─ D (child)

        >>> 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.
        tppid_mapN(R�R�R�RvRRRyRtR�tappendRGRHtitemsRNtcollectionstdefaultdictR�(Rjt	recursiveR�RptpRtRytchildttablet	checkpidstintime((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�s\

c sV|dk	o|dk}t��tr9�fd�}n	d�}|r�|�}|jj�}tj|�|�}|jj�}nX|j}|j}|�}|jj�}|dks�|dkr�||_||_dS|j	|j	|j
|j
}||}	||_||_y||	d�}
Wntk
rDdSXt|
d�SdS(s�Return 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.

        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
          >>>
        gc st��S(N(t_timer((tnum_cpus(sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyttimer�scS s
tt��S(N(tsumRV(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��sidiN(
RvRYR�R�RVttimetsleepR�R�tusertsystemtZeroDivisionErrortround(RjtintervaltblockingR�tst1tpt1tst2tpt2t
delta_proct
delta_timetoverall_percent((R�sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRWes8			
						
		
cC s
|jj�S(s�Return a (user, system) namedtuple representing  the
        accumulated process time, in seconds.
        This is the same as os.times() but per-process.
        (R�RV(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRV�scC s
|jj�S(sReturn a tuple representing RSS (Resident Set Size) and VMS
        (Virtual Memory Size) in bytes.

        On UNIX RSS and VMS are the same values shown by 'ps'.

        On Windows RSS and VMS refer to "Mem Usage" and "VM Size"
        columns of taskmgr.exe.
        (R�tmemory_info(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�s	cC s
|jj�S(s�Return a namedtuple with variable fields depending on the
        platform representing extended memory information about
        this process. All numbers are expressed in bytes.
        (R�tmemory_info_ex(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR
�scC sT|jj�d}tp"t�j}y|t|�dSWntk
rOdSXdS(s�Compare physical system memory to process resident memory
        (RSS) and calculate process memory utilization as a percentage.
        iidgN(R�Rt
_TOTAL_PHYMEMRTttotaltfloatR(Rjtrssttotal_phymem((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytmemory_percent�s
tmemory_mapsc	C s�|jj�}|r�i}xa|D]Y}|d}|d}y!td�|||�||<Wq"tk
rz|||<q"Xq"Wtj}g|D]}||||�^q�Stj}g|D]}||�^q�SdS(s�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').
            iicS s||S(N((R�ty((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt<lambda>�RgN(R�RtmapR�R�t
pmmap_groupedt	pmmap_ext(	RjtgroupedtittdttuplR�tnumsReR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�s


!
	$	cC s
|jj�S(s�Return files opened by process as a list of
        (path, fd) namedtuples including the absolute file name
        and file descriptor number.
        (R�t
open_files(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�stinetcC s|jj|�S(s�Return 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�tconnections(Rjtkind((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR!�scC s�|jdkrtd��nytj|j|�Wn�tk
r�}|jtjkr�tr�t|j�r�t	|j|j
|j��q�t|_
t|j|j
��n|jtjtjfkr�t|j|j
��n�nXdS(Nis�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 0(RtR�R�R�tOSErrorterrnotESRCHt_OPENBSDRPRHR|R�R�R�RGtEPERMtEACCESRI(RjtsigR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt_send_signals	cC s�tr|j|�nn|tjkr5|jj�nO|ttdt��ttdt��fkrx|jj|�nt	d��dS(s�Send a signal 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().
        tCTRL_C_EVENTtCTRL_BREAK_EVENTsPonly SIGTERM, CTRL_C_EVENT and CTRL_BREAK_EVENT signals are supported on WindowsN(
R�R*tsignaltSIGTERMR�R�R�tobjectR�R�(RjR)((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�"scC s*tr|jtj�n
|jj�dS(s�Suspend process execution with SIGSTOP pre-emptively checking
        whether PID has been reused.
        On Windows this has the effect ot suspending all process threads.
        N(R�R*R-tSIGSTOPR�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�7scC s*tr|jtj�n
|jj�dS(s�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(R�R*R-tSIGCONTR�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�BscC s*tr|jtj�n
|jj�dS(s�Terminate the process with SIGTERM pre-emptively checking
        whether PID has been reused.
        On Windows this is an alias for kill().
        N(R�R*R-R.R�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�MscC s*tr|jtj�n
|jj�dS(sjKill the current process with SIGKILL pre-emptively checking
        whether PID has been reused.
        N(R�R*R-tSIGKILLR�R�(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�XscC s8|dk	r(|dkr(td��n|jj|�S(s�Wait for process to terminate and, if process is a children
        of os.getpid(), also return its exit code, else None.

        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().
        is"timeout must be a positive integerN(RvR�R�R�(Rjttimeout((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR�bsN(=RnRmRrRvRkR�R�RsRqR�R�R�R�R�R{tpropertyRtRyRuR�R�R�R�R�R�R�R�R�R�R�R�R�R�RNR�R�R�R�R�R�R�R�R�R�R�RWRVRR
RR�RRR!R*R�R�R�R�R�R�(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRN;st/					)					'										
			_G					
cB s5eZdZd�Zd�Zd�Zdd�ZRS(syA more convenient interface to stdlib subprocess.Popen class.
    It starts a sub process and deals with it exactly as when using
    subprocess.Popen class but in addition also provides all the
    properties and methods of psutil.Process class as a unified
    interface:

      >>> 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
      >>>

    For method names common to both classes such as kill(), terminate()
    and wait(), psutil.Process implementation takes precedence.

    Unlike subprocess.Popen this class pre-emptively checks wheter PID
    has been reused on send_signal(), terminate() and kill() so that
    you don't accidentally terminate another process, fixing
    http://bugs.python.org/issue6973.

    For a complete documentation refer to:
    http://docs.python.org/library/subprocess.html
    cO s2tj||�|_|j|jjdt�dS(NR�(t
subprocessROt_Popen__subprocR�RtR�(RjR}R~((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRk�scC s#tttt�ttj���S(N(tsortedR�R�ROR5(Rj((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt__dir__�scC ssytj||�SWnXtk
rnytj|j|�SWqotk
rjtd|jj|f��qoXnXdS(Ns!%s instance has no attribute '%s'(R/t__getattribute__tAttributeErrorR6RlRn(RjRu((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR9�s

cC sD|jjdk	r|jjStt|�j|�}||j_|S(N(R6t
returncodeRvtsuperROR�(RjR3Rp((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR��s

N(RnRmRrRkR8R9RvR�(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyROxs
!			
cC s
tj�S(s&Return a list of current running PIDs.(R�RQ(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRQ�scC s@|dkrtS|dkr/tr/|t�kStj|�SdS(s�Return True if given PID exists in the current process list.
    This is faster than doing "pid in psutil.pids()" and
    should be preferred.
    iN(R�R�RQR�RP(Rt((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRP�s

cc sRd�}d�}tt��}ttj��}||}||}x|D]}||�qNWx�tttj��ttj|�j���D]�\}}y=|dkr�||�Vn|j
�r�|Vn||�VWq�tk
r�||�q�tk
rI|dkrC|tkrCy
t|VWqFt
k
r?qFXqJ�q�Xq�WdS(s�Return 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.
    cS st|�}|t|j<|S(N(RNt_pmapRt(Rttproc((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytadd�s
cS stj|d�dS(N(R=tpopRv(Rt((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pytremove�sN(R�RQR=tkeysR7R�R�R�tfromkeysRvR{RGRIR�(R?RAtatbtnew_pidst	gone_pidsRtR>((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRR�s2		


)




c	 s���fd�}|dk	rD|dkrDd|}t|��nt��t|�}�dk	r�t��r�tdt��n|dk	r�t�|}nx�|rC|dk	r�|dkr�Pnxm|D]e}dt|�}|dk	r%t|t�|�}|dkrPn|||�q�|||�q�W|�}q�W|rux|D]}||d�qQW|�}nt��t|�fS(s�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.

    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 syy|jd|�}Wntk
r)nLX|dk	sC|j�ru||_�j|��dk	ru�|�qundS(NR3(R�RJRvR{R;R?(R>R3R;(tcallbacktgone(sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt
check_gone2s
	
is*timeout must be a positive integer, got %sscallback %r is not a callableg�?N(	RvR�R�RR�R�R�tminR�(	tprocsR3RHRJRitalivetdeadlineR>tmax_timeout((RHRIsQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRSs6"
		


cC s|rtj�Stj�SdS(sxReturn 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()
    N(R�tcpu_count_logicaltcpu_count_physical(tlogical((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRYks
cC s|stj�Stj�SdS(s�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.
    N(R�RVt
per_cpu_times(tpercpu((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRV�s
RTcC s|dk	o|dk}d�}|sz|rFt�}tj|�nt}|dkrdt�}nt�a||t�Sg}|r�tdt�}tj|�n$t}|dkr�tdt�}ntdt�ax3t|t�D]"\}}|j|||��q�W|SdS(s�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
      >>>
    gc	S sqt|�}||j}t|�}||j}||krBdS||}||}||d}t|d�S(Ngidi(R�tidleR(	tt1tt2tt1_alltt1_busytt2_alltt2_busyt
busy_deltat	all_deltat	busy_perc((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt	calculate�s



RTN(	RvRVR�R�t_last_cpu_timesR�t_last_per_cpu_timestzipR�(RRTRR_RVRpttot1RW((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRW�s,%			
cC s|dk	o|dk}d�}|sz|rFt�}tj|�nt}|dkrdt�}nt�a||t�Sg}|r�tdt�}tj|�n$t}|dkr�tdt�}ntdt�ax3t|t�D]"\}}|j|||��q�W|SdS(s�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().
    gcS s�g}t|�t|�}x�|jD]�}t||�t||�}yd||}Wntk
rsd}nXt|d�}|dkr�d}n|dkr�d}n|j|�q&Wtj|�S(NidgigY@(R�t_fieldsR�RRR�R�t	scputimes(RVRWRR]tfieldtfield_deltat
field_perc((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR_s


		RTN(	RvRVR�R�t_last_cpu_times_2R�t_last_per_cpu_times_2RbR�(RRTRR_RVRpRcRW((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRXs,			
cC stj�}|ja|S(s�Return statistics about system memory usage as a namedtuple
    including the following fields, expressed in bytes:

     - total:
       total physical memory available.

     - available:
       the actual amount of available memory that can be given
       instantly to processes that request more memory in bytes; this
       is calculated by summing different memory values depending on
       the platform (e.g. free + buffers + cached on Linux) and it is
       supposed to be used to monitor actual memory usage in a cross
       platform fashion.

     - percent:
       the percentage usage calculated as (total - available) / total * 100

     - used:
       memory used, calculated differently depending on the platform and
       designed for informational purposes only:
        OSX: active + inactive + wired
        BSD: active + wired + cached
        LINUX: total - free

     - free:
       memory not being used at all (zeroed) that is readily available;
       note that this doesn't reflect the actual memory available
       (use 'available' instead)

    Platform-specific fields:

     - active (UNIX):
       memory currently in use or very recently used, and so it is in RAM.

     - inactive (UNIX):
       memory that is marked as not used.

     - buffers (BSD, Linux):
       cache for things like file system metadata.

     - cached (BSD, OSX):
       cache for various things.

     - wired (OSX, BSD):
       memory that is marked to always stay in RAM. It is never moved to disk.

     - shared (BSD):
       memory that may be simultaneously accessed by multiple processes.

    The sum of 'used' and 'available' does not necessarily equal total.
    On Windows 'available' and 'free' are the same.
    (R�RTRR(Rp((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRTZs6	cC s
tj�S(s�Return system swap memory statistics as a namedtuple including
    the following fields:

     - total:   total swap memory in bytes
     - used:    used swap memory in bytes
     - free:    free swap memory in bytes
     - percent: the percentage usage
     - sin:     no. of bytes the system has swapped in from disk (cumulative)
     - sout:    no. of bytes the system has swapped out from disk (cumulative)

    'sin' and 'sout' on Windows are meaningless and always set to 0.
    (R�RU(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRU�s
cC s
tj|�S(s�Return disk usage statistics about the given path as a namedtuple
    including total, used and free space expressed in bytes plus the
    percentage usage.
    (R�R`(R�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR`�scC s
tj|�S(s3Return mounted partitions as a list of
    (device, mountpoint, fstype, opts) namedtuple.
    'opts' field is a raw string separated by commas indicating mount
    options which may vary depending on the platform.

    If "all" parameter is False return physical devices only and ignore
    all others.
    (R�R_(tall((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR_�s	cC s�tj�}|s!td��n|r[x-|j�D]\}}tj|�||<q4W|Stjgt|j��D]}t|�^qt�SdS(s�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 milliseconds)
     - write_time:  time spent writing to disk (in milliseconds)

    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.

    On recent Windows versions 'diskperf -y' command may need to be
    executed first otherwise this function won't find any disk.
    scouldn't find any physical diskN(	R�R^tRuntimeErrorR�RtsdiskioRbtvaluesR�(tperdisktrawdicttdisktfieldsR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR^�scC s�tj�}|s!td��n|r[x-|j�D]\}}tj|�||<q4W|Stjgt|j��D]}t|�^qt�SdS(s Return network I/O statistics as a namedtuple including
    the following fields:

     - bytes_sent:   number of bytes sent
     - bytes_recv:   number of bytes received
     - packets_sent: number of packets sent
     - packets_recv: number of packets received
     - errin:        total number of errors while receiving
     - errout:       total number of errors while sending
     - dropin:       total number of incoming packets which were dropped
     - dropout:      total number of outgoing packets which were dropped
                     (always 0 on OSX and BSD)

    If pernic is True return the same information for every
    network interface installed on the system as a dictionary
    with network interface names as the keys and the namedtuple
    described above as the values.
    s#couldn't find any network interfaceN(	R�RZRlR�RtsnetioRbRnR�(tpernicRptnicRrR�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRZ�sR cC s
tj|�S(s
Return system-wide 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 OSX this function requires root privileges.
    (R�R[(R"((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR[sc
C s&tjd	k}|r$ddl}ntj�}|jdd��tjt�}x�|D]�\}}}}}}	|r�y|j	|�}Wq�t
k
r�tjdkr�|dkr�tj
}q�ttd�r�tj
|kr�tj
}q�q�Xn||jtj|||||	��qYWt|�S(
sJReturn 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
     - address
     - netmask
     - broadcast
     - ptp

    '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 (tipically a VPN).
    'broadcast' and 'ptp' are mutually exclusive.

    Note: you can have more than one address of the same family
    associated with each interface.
    iii����NtkeycS s|dS(Ni((R�((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR5RgReRM(ii(tsysRKtsocketR�R\tsortR�R�R�t
AddressFamilyR�R�RuRMR�R�RtsnicR�(
t	has_enumsRxtrawlistRpRutfamtaddrtmaskt	broadcasttptp((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR\s$
*cC s
tj�S(sReturn 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�R](((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyR]HscC s
tj�S(sAReturn the system boot time expressed in seconds since the epoch.(R�Rb(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRb\scC s
tj�S(s�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�Ra(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyRacs
c
C sFddl}|jj�}d}dddddd	d
g}tr_|jd�|jd�n|d!GHx�t�D]�}y|j|dd�}Wntk
r�qrX|d	r�|jj|d	�}|j�|kr�|j	d�}q|j	d�}nd}t
j	dt
jt|d���}y|j
�}Wntk
rOd}nXtrxd|krx|jd�d}n|d
r�t|d
jd�p�d}	|d
r�t|d
jd�p�d}
|dr�t|dd�p�d}||d  |d|d||	|
|jdd�pd|||dj�p8df
GHqrWdS("sNList info of all currently running processes emulating ps aux
    output.
    i����Ns+%-10s %5s %4s %4s %7s %7s %-13s %5s %7s  %sRtRWRRuRVR�RR�R�tUSERtPIDs%CPUs%MEMtVSZtRSStTTYtSTARTtTIMEtCOMMANDR�Rgs%H:%Ms%b%ds%M:%Ss\iit?i
(
R�R�s%CPUs%MEMR�R�R�R�R�R�(tdatetimetdatettodayR�R�RRR�RGt
fromtimestamptstrftimeR�t	localtimeR�R�RFR�tsplitR�tvmsRRtgetRo(R�t	today_dayttemplR�R�tpinfoR�tcputimeR�R�Rtmemp((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyttestps\


	




iit__main__(�Rrt
__future__RR�R$R�R�R-R5RwR�t	tracebackR�R�RvRgRRt_compatRRRR�RRRR	R
RRR
RRRRRRRRRRRRRRRRRRtplatformR�tPROCFS_PATHR!R�R"R#R$R%tHAS_PRLIMITR2R&R'R(R)R*R+R,R-R.R/R0R1tRLIMIT_MSGQUEUER:tRLIMIT_NICEt
RLIMIT_RTPRIOt
RLIMIT_RTTIMEtRLIMIT_SIGPENDINGR4t_psutil_windowsR5R6R7R8R9R:R;R=RARCRDRER�t__all__textendt__extra__all__t
__author__RLttupleR�tnumR�RKRMRRuR�R�R&R�R�treplacetcextt__file__Rit	ExceptionRFRGRHRIRJR�R/RNRORQRPR=RRRSR�RYR�RVR`t	print_excRaRWRiRjRXRTRUR`R_R^RZR[R\R]RbRaR�Rn(((sQC:/Program Files (x86)/Alibaba/Aegis/PythonLoader/third_party\psutil3\__init__.pyt<module>
s�

	










				.			
					���@D			:[


[R	<		#	.			
	8

© 2026 UnknownSec