403 Forbidden


Disable Functions:
Path : /lib64/python2.7/site-packages/psutil/
File Upload :
Command :
Current File : //lib64/python2.7/site-packages/psutil/__init__.pyo

�
S��]cG@ s�
dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZyddl
Z
Wnek
r�eZ
nXddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlm 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,ddlm-Z-ddlm.Z.dd lm/Z/dd!lm0Z0dd"lm1Z1dd#lm2Z2dd$lm3Z3dd%lm4Z4dd&lm5Z5dd'lm6Z6dd(lm7Z7dd)lm8Z8dd*lm9Z9dd+lm:Z:dd,lm;Z;dd-lm<Z<dd.lm=Z=dd/lm>Z>dd0lm?Z?dd1lm@Z@dd2lmAZAdd3lmBZBe;r�d4ZCdd5lmDZEdd6lDmFZFdd7lDmGZGdd8lDmHZHdd9lDmIZIeEjJr�dd:lKmLZLdd;lKmMZMdd<lKmNZNdd=lKmOZOdd>lKmPZPdd?lKmQZQdd@lKmRZRddAlKmSZSddBlKmTZTddClKmUZUddDlKmVZVddElKmWZWddFlmKZKy
eKjXZXWneYk
r�nXy
eKjZZZWneYk
rnXy
eKj[Z[WneYk
r?nXy
eKj\Z\WneYk
r`nXy
eKj]Z]WneYk
r�nXnnleBrQddGlm^ZEddHl_m`Z`ddIl_maZaddJl_mbZbddKl_mcZcddLl_mdZdddMl_meZeddNl^mfZfddOl^mgZgddPl^mhZhddQl^miZiddRl^mjZjn�e<rjddSlmkZEn�e9r�ddTlmlZEnqeAr�ddUlmmZEddVlmmnZnddWlmmoZod4ZCn2e8r�ddXlmpZEd4ZCneqdYe
jr��dZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdjdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gGZsesjteEju�d�Zvd�Zwexgewjyd��D]Zze{ez�^q��Z|e}ed�ej�Z~eEjZej�Z�ej�Z�ea�ea�e{ewj�d�d���e}eEj�d�e�kr-	d�e}eEj�d��Z�e�eEj�d��r�e�d�d�j�ge�eEj�j��D]Z�e�^q��ewf7Z�ne�d�ew7Z�e�d�e}eEj�d�d��7Z�e�d�7Z�ee���ndZe�fd���YZ�d[e�fd���YZ�d\e�fd���YZ�d]e�fd���YZ�d^e�fd���YZ�e�eE_�e�eE_�e�eE_�e�eE_�e@r�	dd�lm�Z�e�e�_�ne�eEd��r�	eEj�Z�n	d��Z�d��Z�d��Z�d�e�fd���YZ�d�e�fd���YZ�e�ge�e��D]RZ�e�j�d��o�
e�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gkr�
e�^qS
�Z�d��Z�d��Z�iZ�ej��Z�eed��Z�eed��Z�e�d��Z�e�d��Z�y
e��a�Wne�k
r.ea�nXye�d�e��a�Wne�k
r[ea�nXd��Z�d��Z�d��Z�ee�d��Z�t�a�t�a�ee�d��Z�d��Z�e�eEd��r�e�d��Z�esj�d��ne�ed��p�e�eEd��r'e�ed��rej�Z�n	eEj�Z�esj�d��nd��Z�d��Z�d��Z�e�d��Z�e�e�d��Z�ej�ej�d��e�_�d�e�j�_e�e�d��Z�ej�ej�d��e�_�d�e�j�_d�d��Z�d��Z�d��Z�e�eEd��r�e�d��Z�esj�d��ne�eEd��r%
d��Z�esj�d��ne�eEd��rM
d��Z�esj�d��nd��Z�d��Z�eBrz
d��Z�d��Z�nd��Z�[[[[e
j|d�d�kr�
[z[�ne�d�kr�
e��ndS(�s3psutil 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 from 2.6 to 3.4+.
i����(tdivisionNi(t_common(tdeprecated_method(tmemoize(tmemoize_when_activated(twrap_numbers(tlong(tPermissionError(tProcessLookupError(tPY3(tSTATUS_DEAD(tSTATUS_DISK_SLEEP(tSTATUS_IDLE(t
STATUS_LOCKED(t
STATUS_PARKED(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_UNKNOWN(tAIX(tBSD(tFREEBSD(tLINUX(tMACOS(tNETBSD(tOPENBSD(tOSX(tPOSIX(tSUNOS(tWINDOWSs/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_linux(t
_pswindows(tABOVE_NORMAL_PRIORITY_CLASS(tBELOW_NORMAL_PRIORITY_CLASS(tHIGH_PRIORITY_CLASS(tIDLE_PRIORITY_CLASS(tNORMAL_PRIORITY_CLASS(tREALTIME_PRIORITY_CLASS(tCONN_DELETE_TCB(tIOPRIO_VERYLOW(t
IOPRIO_LOW(t
IOPRIO_NORMAL(tIOPRIO_HIGH(t_psosx(t_psbsd(t_pssunos(t
CONN_BOUND(t	CONN_IDLE(t_psaixsplatform %s is not supportedtErrort
NoSuchProcesst
ZombieProcesstAccessDeniedtTimeoutExpiredtversion_infot__version__RRRRRRRR
RR
RRRR RRRR!RRRRRRtAF_LINKR"R#R$tPOWER_TIME_UNKNOWNtPOWER_TIME_UNLIMITEDR&R'R(R*R+R)R,R-R.R/R%tProcesstPopent
pid_existstpidstprocess_itert
wait_procstvirtual_memorytswap_memoryt	cpu_timestcpu_percenttcpu_times_percentt	cpu_countt	cpu_statstnet_io_counterstnet_connectionstnet_if_addrstnet_if_statstdisk_io_counterstdisk_partitionst
disk_usagetuserst	boot_timesGiampaolo Rodola's5.6.7t.t	monotonicttversionsOversion conflict: %r C extension module was built for another version of psutilt__file__s (%s instead of %s)s (different than %s)s;; you may try to 'pip uninstall psutil', manually remove %ss%the existing psutil install directorys1 or clean the virtual env somehow, then reinstallcB s)eZdZdd�Zd�ZeZRS(sQBase exception class. All other psutil exceptions inherit
    from this one.
    RvcC stj||�||_dS(N(t	Exceptiont__init__tmsg(tselfR{((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRz
scC s#d|jj|jf}|j�S(Nspsutil.%s %s(t	__class__t__name__R{tstrip(R|tret((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt__repr__s(R~t
__module__t__doc__RzR�t__str__(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRTs	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 (RTRztpidtnameR{tNonetrepr(R|R�R�R{tdetails((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRzs			
N(R~R�R�R�Rz(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRUscB s eZdZdddd�ZRS(s1Exception raised when querying a zombie process. This is
    raised on macOS, 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�d|g}|rp|jdt|j��n|r�|jd|j�nddj	|�}d||_ndS(Nspid=%ssname=%ssppid=%ss(%s)s, s'process still exists but it's a zombie (
RURzR�tppidR�R{R�tappendR�tjoin(R|R�R�R�R{targsR�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRz/s				
N(R~R�R�R�Rz(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRV'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)Rv(RTRzR�R�R{R�R�(R|R�R�R{((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRzBs			N(R~R�R�R�Rz(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRW?scB 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)(RTRztsecondsR�R�R�R{R�(R|R�R�R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRzUs			"N(R~R�R�R�Rz(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRXPs(t_psposixtppid_mapcC sUi}xHt�D]=}ytj|�j�||<Wqttfk
rLqXqW|S(s{Return a {pid: ppid, ...} dict for all running processes in
        one shot. Used to speed up Process.children().
        (Rat_psplatformR^R�RURV(R�R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt	_ppid_mapssc 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_runningRUR�t_name(R|R�tkwargs(tfun(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytwrapper�s(t	functoolstwraps(R�R�((R�s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt_assert_pid_not_reused�scC sPtj�}t||�}|dkr1d}nd}tjj|�j|�S(s(Format seconds in a human readable form.i<is%H:%M:%Ss%Y-%m-%d %H:%M:%Sii�Q(ttimetinttdatetimet
fromtimestamptstrftime(tsecstnowtsecs_agotfmt((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt_pprint_secs�s	cB s2eZdZdAd�Zed�Zd�ZeZd�Z	d�Z
d�Zed��Z
ejd��ZdAdAd	�Zd
�Zd�Zd�Zed
��Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdAd�Zer&ed��Z d�Z!d�Z"d�Z#ne$e%j&d�rDd�Z'ne$e%j&d�rhdAdAd�Z(ne$e%j&d�r�dAd�Z)ne$e%j&d �r�dAd!�Z*ne$e%j&d"�r�d#�Z+ne$e%j&d$�r�d%�Z,ne-r�d&�Z.nd'�Z/d(�Z0e$e%j&d)�r(d*�Z1ne2ed+��Z3dAd,�Z4ed-��Z5ed.��Z6e7d/d0�d1��Z8d2�Z9d3d4�Z:e$e%j&d5�r�e;d6�Z<nd7�Z=d8d9�Z>er�d:�Z?ne2d;��Z@e2d<��ZAe2d=��ZBe2d>��ZCe2d?��ZDdAd@�ZERS(Bs'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(R|R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRz�scC se|dkrtj�}nOtrKt|ttf�rKtd|��n|dkrjtd|��n||_	d|_
d|_d|_t
|_d|_tj�|_d|_tj|�|_d|_d|_y|j�Wn_tk
r�nOtk
r
n?tk
rK|s?d|}t|d|��qLt|_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( R�tostgetpidt_PY3t
isinstanceR�Rt	TypeErrort
ValueErrort_pidR�t_exet_create_timetFalset_gonet_hasht	threadingtRLockt_lockt_ppidR�R^t_proct_last_sys_cpu_timest_last_proc_cpu_timestcreate_timeRWRVRUtTrueR�t_ident(R|R�t_ignore_nspR{((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s<
									




c	C sytj�}Wntk
r)i}nX|j|d<y3|j�|d<|jrit|j�|d<nWnEtk
r�d|d<n+tk
r�d|d<nt	k
r�nXd|j
j|j
jdj
g|j�D]\}}d	||f^q��fS(
NR�R�tstartedtzombietstatust
terminateds	%s.%s(%s)s, s%s=%r(tcollectionstOrderedDicttAttributeErrorR�R�R�R�RVRURWR}R�R~R�titems(R|tinfotktv((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s&


	




		cC s#t|t�stS|j|jkS(N(R�R^tNotImplementedR�(R|tother((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt__eq__scC s||kS(N((R|R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt__ne__
scC s+|jdkr$t|j�|_n|jS(N(R�R�thashR�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt__hash__scC s|jS(sThe process PID.(R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�sc	c s�|j��t|d�r!dVn�z_|jj|�|jj|�|jj|�trm|jj|�n|jj	�dVWd|jj
|�|jj
|�|jj
|�tr�|jj
|�n|jj�XWdQXdS(s#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
        ...
        >>>
        t_cacheN(R�thasattrRftcache_activatetmemory_infoR�R-tuidsR�t
oneshot_entertcache_deactivatetoneshot_exit(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytoneshots"

	c
C sbt}|dk	r�t|ttttf�sFtdt|���nt|�}||}|r�t	dt
|�dkr�dnddjtt
|��f��q�nt�}|p�|}|j���x�|D]�}y4|dkr�|j}nt||�}	|	�}Wn<ttfk
r*|}n tk
rI|r��q�q�nX|||<q�WWdQX|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.
        sinvalid attrs type %ssinvalid attr name%s %sitsRvs, R�N(t_as_dict_attrnamesR�R�tlistttupletsett	frozensetR�ttypeR�tlenR�tmapR�tdictR�R�tgetattrRWRVtNotImplementedError(
R|tattrstad_valuetvalid_namest
invalid_namestretdicttlsR�R�tmeth((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytas_dict_s6
%	


	
cC s�tdk	rtn
t�d}|j|kr2dS|j�}|dk	r�|j�}y&t|�}|j�|kr{|SWq�tk
r�q�XndS(s�Return the parent process as a Process object pre-emptively
        checking whether PID has been reused.
        If no parent is known return None.
        iN(t_LOWEST_PIDR�RaR�R�R�R^RU(R|t
lowest_pidR�tctimetparent((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s
cC sBg}|j�}x)|dk	r=|j|�|j�}qW|S(s�Return the parents of this process as a list of Process
        instances. If no parents are known return an empty list.
        N(R�R�R�(R|tparentstproc((s5/usr/lib64/python2.7/site-packages/psutil/__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�R^R�RVR�RU(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s	

	cC s9tr|jj�S|jp(|jj�|_|jSdS(s`The process parent PID.
        On Windows the return value is cached after first call.
        N(R-R�R�R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s
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(
R/R�R�R�R�R-R�tcmdlineRWR�tpathtbasenamet
startswith(R|R�R�t
extended_name((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s
	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�R�R�R�tisabstisfileR�R�R�RW(tfallbackR�texe(R|(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytguess_it�s$
	R�N(R�R�R�R�RW(R|R�R�terr((R|s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s
cC s
|jj�S(s3The command line this process has been called with.(R�R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�scC s*y|jj�SWntk
r%tSXdS(s2The process current status as a STATUS_* constant.N(R�R�RVR(R|((s5/usr/lib64/python2.7/site-packages/psutil/__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-tpwdR�tImportErrorR�trealtgetpwuidtpw_nametKeyErrortstrR�tusername(R|treal_uid((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRs
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�R�R�R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�1scC s
|jj�S(s6Process current working directory as an absolute path.(R�tcwd(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR:scC sQ|dkr|jj�S|j�s=t|j|j��n|jj|�dS(s'Get or set process niceness (priority).N(R�R�tnice_getR�RUR�R�tnice_set(R|tvalue((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytnice>s

cC s
|jj�S(sVReturn process UIDs as a (real, effective, saved)
            namedtuple.
            (R�R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�IscC s
|jj�S(sVReturn process GIDs as a (real, effective, saved)
            namedtuple.
            (R�tgids(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRPscC s
|jj�S(sVThe terminal associated with this process, if any,
            else None.
            (R�tterminal(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR
VscC s
|jj�S(scReturn the number of file descriptors opened by this
            process (POSIX only).
            (R�tnum_fds(R|((s5/usr/lib64/python2.7/site-packages/psutil/__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(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRest
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(R�R�R�Rt
ionice_set(R|tioclassR
((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytioniceqs

trlimitcC 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(R�R�R(R|tresourcetlimits((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�s
tcpu_affinity_getcC s�|dkr%tt|jj���S|sst|jd�rO|jj�}qsttt	t
dt����}n|jjtt|���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]).
            If an empty list is passed, all egible CPUs are assumed
            (and set).
            (Windows, Linux and BSD only).
            t_get_eligible_cpustpercpuN(
R�R�R�R�RR�RR�trangeR�RfR�tcpu_affinity_set(R|tcpus((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytcpu_affinity�s$tcpu_numcC s
|jj�S(sZReturn what CPU this process is currently running on.
            The returned number should be <= psutil.cpu_count()
            and <= len(psutil.cpu_percent(percpu=True)).
            It may be used in conjunction with
            psutil.cpu_percent(percpu=True) to observe the system
            workload distributed across CPUs.
            (R�R(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�stenvironcC s
|jj�S(s�The environment variables of the process as a dict.  Note: this
            might not reflect changes made after the process started.  (R�R(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�scC s
|jj�S(s\Return the number of handles opened by this process
            (Windows only).
            (R�tnum_handles(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR �scC s
|jj�S(skReturn the number of voluntary and involuntary context
        switches performed by this process.
        (R�tnum_ctx_switches(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR!�scC s
|jj�S(s2Return the number of threads used by this process.(R�tnum_threads(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR"�stthreadscC 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�R#(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR#�scC s�t�}g}|s�x�|j�D]p\}}||jkr"y8t|�}|j�|j�krt|j|�nWq�ttfk
r�q�Xq"q"Wntj	t
�}x+|j�D]\}}||j|�q�Wt�}|jg}	x�|	r�|	j�}||krq�n|j
|�xw||D]k}
yKt|
�}|j�|j�k}|rz|j|�|	j|
�nWq*ttfk
r�q*Xq*Wq�W|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.
        (R�R�R�R^R�R�RURVR�tdefaultdictR�R�tpoptadd(R|t	recursiveR�R�R�R�tchildtreverse_ppid_maptseentstackt	child_pidtintime((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytchildren�s>			

c	 s{|dk	o|dk}|dk	rC|dkrCtd|��nt�pOd��fd�}|r�|�}|jj�}tj|�|�}|jj�}nX|j}|j}|�}|jj�}|dks�|dkr�||_||_dS|j	|j	|j
|j
}||}	||_||_y||	d}
Wntk
r_dSX|
�}t|d�SdS(sReturn 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
          >>>
        gis!interval is not positive (got %r)ic st��S(N(t_timer((tnum_cpus(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyttimerJsidN(
R�R�RiR�RfR�tsleepR�R�tusertsystemtZeroDivisionErrortround(R|tintervaltblockingR1tst1tpt1tst2tpt2t
delta_proct
delta_timetoverall_cpus_percenttsingle_cpu_percent((R0s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRg"s:#	
						
		

cC s
|jj�S(s%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�Rf(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRf~s	cC s
|jj�S(sReturn a namedtuple with variable fields depending on the
        platform, representing memory information about the process.

        The "portable" fields available on all plaforms are `rss` and `vms`.

        All numbers are expressed in bytes.
        (R�R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s	treplacementR�cC s
|j�S(N(R�(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytmemory_info_ex�scC s
|jj�S(s]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�tmemory_full_info(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRC�strsscC s�ttjj�}||kr=td|t|�f��n|tjjkrX|jn|j}|�}t	||�}t
p�t�j}|dks�td|��n|t
|�dS(s�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')
        s&invalid memtype %r; valid types are %ris`can't calculate process memory percent because total physical system memory is not positive (%r)id(R�R�tpfullmemt_fieldsR�R�tpmemR�RCR�t
_TOTAL_PHYMEMRdttotaltfloat(R|tmemtypetvalid_typesR�tmetricsR
ttotal_phymem((s5/usr/lib64/python2.7/site-packages/psutil/__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((txty((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt<lambda>�sN(R�RPR�RR�t
pmmap_groupedt	pmmap_ext(	R|tgroupedtittdttuplR�tnumstntRQ((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRP�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(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR\�stinetcC s|jj|�S(sTReturn 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�tconnections(R|tkind((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR^�scC s�|jdkrtd��nytj|j|�Wn�tk
r�trxt|j�rxt|j|j|j	��q�t
|_t|j|j��n&t
k
r�t|j|j��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(R�R�R�tkillRR+R`RVR�R�R�R�RURRW(R|tsig((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt_send_signals
	
cC s�tr|j|�nn|tjkr5|jj�nO|ttdt��ttdt��fkrx|jj|�nt	d��dS(s�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().
        tCTRL_C_EVENTtCTRL_BREAK_EVENTsPonly SIGTERM, CTRL_C_EVENT and CTRL_BREAK_EVENT signals are supported on WindowsN(
R-RbtsignaltSIGTERMR�R`R�tobjecttsend_signalR�(R|Ra((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRhscC 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-RbRetSIGSTOPR�tsuspend(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRj-scC 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-RbRetSIGCONTR�tresume(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRl8scC 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-RbReRfR�R`(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt	terminateCscC s*tr|jtj�n
|jj�dS(sjKill the current process with SIGKILL pre-emptively checking
        whether PID has been reused.
        N(R-RbRetSIGKILLR�R`(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR`NscC 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(R�R�R�twait(R|ttimeout((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRoXsN(FR~R�R�R�RzR�R�R�R�R�R�R�tpropertyR�t
contextlibtcontextmanagerR�R�R�R�R�RR�R�R�R�R�RR�RRR-R�RR
RR�R�R^RRRRRRR/R R!R"R#R�R.RgRfR�RRBRCROR�RPR\R^RbRhRjRlRmR`Ro(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR^�s�/				C,					'									
		E\		
cB sGeZdZd�Zd�Zd�Zd�Zd�Zdd�Z	RS(s|A 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 whether 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/3/library/subprocess.html
    cO s2tj||�|_|j|jjdt�dS(NR�(t
subprocessR_t_Popen__subprocR�R�R�(R|R�R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRz�scC s#tttt�ttj���S(N(tsortedR�tdirR_Rt(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt__dir__�scC s&t|jd�r"|jj�n|S(Nt	__enter__(R�RuRy(R|((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRy�scO s�t|jd�r%|jj||�S|jr>|jj�n|jrW|jj�nz|jrs|jj�nWd|j�XdS(Nt__exit__(R�RuRztstdouttclosetstderrtstdinRo(R|R�R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRz�s			cC ssytj||�SWnXtk
rnytj|j|�SWqotk
rjtd|jj|f��qoXnXdS(Ns!%s instance has no attribute '%s'(Rgt__getattribute__R�RuR}R~(R|R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�s

cC sD|jjdk	r|jjStt|�j|�}||j_|S(N(Rut
returncodeR�tsuperR_Ro(R|RpR�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRo�s

N(
R~R�R�RzRxRyRzRR�Ro(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR_ns!					
t_RhRjRlRmR`RoR�R�R�R�R.RRBR�cC s ttj��}|da|S(s&Return a list of current running PIDs.i(RvR�RaR�(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRa�s
cC 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-RaR�R`(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR`�s

c	# s���fd�}d�}tt��}ttj��}||}||}x|D]}||�qWWt�6tttj��ttj	|�j���}	WdQXx�|	D]�\}}
yg|
dkr�||�VnI|
j�r�dk	r|
jd�d��|
_
n|
Vn||�VWq�tk
r@||�q�tk
r�|
dkr�|tkr�y
t|VWq�tk
r�q�Xq��q�Xq�WdS(sReturn 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 sTt|�}�dk	r6|jd�d��|_nt�|t|j<WdQX|S(NR�R�(R^R�R�R�R�t_pmapR�(R�R�(R�R�(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR&scS s!t�tj|d�WdQXdS(N(R�R�R%R�(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytremove
sNR�R�(R�RaR�tkeysR�RvR�R�R�tfromkeysR�R�R�R�RURWR(R�R�R&R�tatbtnew_pidst	gone_pidsR�R�R�((R�R�s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRb�s<	


%	




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.
    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 syy|jd|�}Wntk
r)nLX|dk	sC|j�ru||_�j|��dk	ru�|�qundS(NRp(RoRXR�R�R�R&(R�RpR�(tcallbacktgone(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt
check_gone\s
	
is*timeout must be a positive integer, got %sscallback %r is not a callableg�?N(	R�R�R�tcallableR�R/R�tminR�(	tprocsRpR�R�R{talivetdeadlineR�tmax_timeout((R�R�s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRc8s6$
		


cC sF|rtj�}ntj�}|dk	rB|dkrBd}n|S(szReturn 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()
    iN(R�tcpu_count_logicaltcpu_count_physicalR�(tlogicalR�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRi�s	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�Rft
per_cpu_times(R((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRf�s
RcC sEt|�}trA|t|dd�8}|t|dd�8}n|S(sWGiven a cpu_time() ntuple calculates the total CPU time
    (including idle time).
    tguestit
guest_nice(tsumR(R�(ttimesttot((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt
_cpu_tot_time�s
	cC s3t|�}||j8}|t|dd�8}|S(slGiven a cpu_time() ntuple calculates the busy CPU time.
    We do so by subtracting all idle CPU times.
    tiowaiti(R�tidleR�(R�tbusy((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt_cpu_busy_time�s
cC sbg}xLtjjD]>}t||�t||�}td|�}|j|�qWtj|�S(Ni(R�t	scputimesRFR�tmaxR�(tt1tt2tfield_deltastfieldtfield_delta((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt_cpu_times_deltas�scC sA|dk	o|dk}|dk	rC|dkrCtd|��nd�}|s�|rqt�}tj|�nt}|dkr�t�}nt�a||t�Sg}|r�tdt�}tj|�n$t}|dkr�tdt�}ntdt�ax3t|t�D]"\}}|j	|||��qW|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
      >>>
    gis!interval is not positive (got %r)cS s_t||�}t|�}t|�}y||d}Wntk
rMdSXt|d�SdS(Nidgi(R�R�R�R5R6(R�R�ttimes_deltat	all_deltat
busy_deltat	busy_perc((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt	calculate6s
RN(
R�R�RfR�R2t_last_cpu_timesR�t_last_per_cpu_timestzipR�(R7RR8R�R�R�ttot1R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRg
s0%			
cC sA|dk	o|dk}|dk	rC|dkrCtd|��nd�}|s�|rqt�}tj|�nt}|dkr�t�}nt�a||t�Sg}|r�tdt�}tj|�n$t}|dkr�tdt�}ntdt�ax3t|t�D]"\}}|j	|||��qW|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().
    gis!interval is not positive (got %r)cS s�g}t||�}t|�}dtd|�}xL|D]D}||}t|d�}ttd|�d�}|j|�q;Wtj|�S(NgY@ig(R�R�R�R6R�R�R�R�(R�R�RZR�R�tscaleR�t
field_perc((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�~s

RN(
R�R�RfR�R2t_last_cpu_times_2R�t_last_per_cpu_times_2R�R�(R7RR8R�R�R�R�R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRhks0			
cC s
tj�S(sReturn CPU statistics.(R�Rj(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRj�stcpu_freqcC stj�}|r|Stt|��}|dkr8dS|dkrL|dSd\}}}t}xV|D]N}||j7}tr�|jdkr�t	}qhn||j7}||j
7}qhW||}|r�d}	}
n||}	||}
tj||	|
�SdS(s9Return CPU frequency as a nameduple 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.
        iigN(ggg(
R�R�RJR�R�R�tcurrentR(R�R�R�Rtscpufreq(RR�R0tcurrstminstmaxstset_nonetcpuR�tmin_tmax_((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��s.






t
getloadavgcC 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 memory that can be given instantly to processes without the
       system going into swap.
       This is calculated by summing different memory values depending
       on the platform 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:
        macOS: active + 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, macOS):
       cache for various things.

     - wired (macOS, 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�RdRIRH(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRd�s5	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�Re(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRe-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�Rq(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRqBscC 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�Rp(tall((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRpJs	cC s�trtd|�ni}tj|�}|s>|r:iSdS|rVt|d�}nttdtj�}|r�x*|j	�D]\}}||�||<q~W|S|gt
|j��D]}t|�^q��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 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.
    tperdiskspsutil.disk_io_counterstsdiskioN(
R(R�R�RoR�t
_wrap_numbersR�RR�R�R�tvaluesR�(R�tnowrapR�trawdictR[tdisktfieldsRQ((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRoVs spsutil.disk_io_counterssClears nowrap argument cachecC s�tj�}|s |riSdS|r8t|d�}n|rrx-|j�D]\}}tj|�||<qKW|Stjgt|j��D]}t	|�^q��SdS(sdReturn 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 macOS 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.

    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.
    spsutil.net_io_countersN(
R�RkR�R�R�RtsnetioR�R�R�(tpernicR�R�tnicR�RQ((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRk�sspsutil.net_io_countersR]cC s
tj|�S(s�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�Rl(R_((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRl�sc
C sktjdk}|r$ddl}ntj�}|jdd��tjt�}x|D]\}}}}}}	|r�y|j	|�}Wq�t
k
r�tr�|dkr�tj}q�t
td�r�tj|kr�tj}q�q�Xn|tjkr7trdnd	}
x*|j|
�d
kr3|d|
7}q
Wn||jtj|||||	��qYWt|�S(
s*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.
    iii����NtkeycS s|dS(Ni((RQ((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRS�sR[t:t-is%s00(ii(tsysRYtsocketR�RmtsortR�R$R�t
AddressFamilyR�R/R[R�R-tcountR�RtsnicaddrR�(t	has_enumsR�trawlistR�R�tfamtaddrtmaskt	broadcasttptpt	separator((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRm�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�Rn(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRn	stsensors_temperaturesc
	 s��fd�}tjt�}tj�}x�|j�D]�\}}x�|r�|jd�\}}}}	||�}||�}||	�}	|r�|	r�|}	n|	r�|r�|	}n||jtj	||||	��qFWq7Wt
|�S(s<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 s0|dk	r,�r(t|�dddS|SdS(Ni	ii (R�RJ(tn(t
fahrenheit(s5/usr/lib64/python2.7/site-packages/psutil/__init__.pytconvert'	si(R�R$R�R�R�R�R%R�RtshwtempR�(
R�R�R�R�R�R�tlabelR�thightcritical((R�s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�	s 	
	
	
!tsensors_fanscC s
tj�S(s�Return fans speed. Each entry is a namedtuple
        representing a certain hardware sensor.
        All speed are expressed in RPM (rounds per minute).
        (R�R�(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�E	stsensors_batterycC s
tj�S(s�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�R�(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR�R	s
cC s
tj�S(sAReturn the system boot time expressed in seconds since the epoch.(R�Rs(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRsf	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�Rr(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyRrm	s
cC s
tj�S(sjReturn a generator yielding a WindowsService instance for all
        Windows services installed.
        (R�twin_service_iter(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��	scC s
tj|�S(sjGet a Windows service by *name*.
        Raise NoSuchProcess if no service with such name exists.
        (R�twin_service_get(R�((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyR��	scC s�ddlm}ddlm}tjj�}d}ddddd	d
ddd
dg
}|d$GHx�t|dd�D]v}|j	d
r�tjj
|j	d
�}|j�|kr�|jd�}q�|jd�}nd}|j	d	rtjdtj
t|j	d	���}nd}|j	dp+d}|rftrfy|j�d}Wqftk
rbqfXn|r�tr�d|kr�|jd�d}n|d  }|j	ddk	r�||j	dj�nd}	|j	ddk	r�||j	dj�nd}
|j	ddk	r%t|j	dd�nd}|j	d
rKt|j	d
�nd}|j	drwd!j|j	d�}
n
|j	d}
|j	dr�|j	dd" nd}||d# |j	d||	|
|||||
f
}||�d GHquWdS(%Ni(tbytes2human(tget_terminal_sizes)%-10s %5s %5s %7s %7s %5s %6s %6s %6s  %sR�ROR�R�RfR�R�R�RRtUSERtPIDs%MEMtVSZtRSStNICEtSTATUStSTARTtTIMEtCMDLINER�s%H:%Ms%b%dRvs%M:%Sis\i	t ii
(
R�R�s%MEMR�R�R�R�R�R�R�(RR�t_compatR�R�tdatettodayRbR�R�R�R�R�t	localtimeR�R-R�RTR/tsplittvmsRDR6R�R�(R�R�t	today_dayttemplR�tpR�tcputimeR3R�RDtmempRR�R�tline((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyttest�	s`

	"


///&

$

iit__main__(�R�t
__future__RR�RrR�R�R�ReRtR�R�R�R�R�R�RvRRRRRR�R�RRRR	R�R
RRR
RRRRRRRRRRRRRRRRRRR R!R"R#R$R%R&R'R(R)R*R+R,R-R.R/tPROCFS_PATHR0R�R1R2R3R4tHAS_PRLIMITRAR5R6R7R8R9R:R;R<R=R>R?R@tRLIMIT_MSGQUEUER�tRLIMIT_NICEt
RLIMIT_RTPRIOt
RLIMIT_RTTIMEtRLIMIT_SIGPENDINGRBt_psutil_windowsRCRDRERFRGRHRIRJRKRLRMRNRORPRQRRRSR�tplatformt__all__textendt__extra__all__t
__author__RZR�R�tnumR�RYR�R/R[R]R\RHR�treplacetcextR{R�R�RRwRQRyRTRURVRWRXR�R�R�R�R�RgR^R_R�RwR�R�RaR`R�tLockR�RbRcR�RiR�RfR�R�R�R�R�RgR�R�RhRjR�R�R�RdReRqRpRotpartialtcache_clearRkRlRmRnR�R�R�RsRrR�R�RR~(((s5/usr/lib64/python2.7/site-packages/psutil/__init__.pyt<module>s

	










						.			9
					
		����U&		K]




			ZE	(		;		/'	0	 					
	=	

404 Not Found
[ LogOut ]