Uname:Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64

Base Dir : /home/iscmbt-kufa-atu/public_html

User : iscmbt-kufa-atu


403WebShell
403Webshell
Server IP : 89.117.53.150  /  Your IP : 216.73.216.11
Web Server : Apache
System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User : iscmbt-kufa-atu ( 1014)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/psutil/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/psutil/__pycache__/_psbsd.cpython-310.pyc
o

���a8y�@s�dZddlZddlZddlZddlZddlmmZddl	m
Z
ddl	mZddlm
Z
ddlmZddlmZdd	lmZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddlmZddlm Z ddlm!Z!ddlm"Z"gZ#er�ej$e
j%ej&e
j'ej(e
j)ej*e
j+ej,e
j-ej.e
j/ej0e
j1iZ2n=er�ej$e
j%ej(e
j)ej*e
j+ej3e
j-ej,e
j-ej&e
j4ej5e
j'iZ2ner�ej$e
j%ej(e
j)ej*e
j+ej,e
j-ej&e
j4ej5e
j'iZ2ej6e
j7ej8e
j9ej:e
j;ej<e
j=ej>e
j?ej@e
jAejBe
jCejDe
jEejFe
jGejHe
jIejJe
jKejLe
jMiZNe�O�ZPejQZQeRed�ZSeRed�ZTeRed�ZUeRed�ZVeWd�idd�dd�dd �d!d"�d#d$�d%d&�d'd(�d)d*�d+d,�d-d.�d/d0�d1d2�d3d4�d5d6�d7d8�d9d:�d;d<�d=d>�d?d@�dAdB�dCdD�dEdF�dGdH�dIdJ�dKdL��ZXedMgdN��ZYedOgdP��ZZedQgdR��Z[e[Z\edSgdT��Z]edUdV�Z^edWdX�Z_e�r�edYgdZ��Z`nedYgd[��Z`d\d]�Zad^d_�Zbd`da�ZceS�r�dbd�Zdndcd�Zddded_ededf�Zfe�s�e�r�dgdh�Zgndidh�Zgdjdk�Zhd�dldm�ZiejjZjejkZkejlZlejmZmdndo�Zndpdq�Zoe�r*drds�Zpdtdu�Zqdvdw�Zrdxdy�Zsdzd{�Zted|d}��Zud~d�Zve�sBe�rGd�d��ZwnejwZwd�d��Zxd�d��Zyejzd�d���Z{Gd�d��d�e|�Z}dS)�z5FreeBSD, OpenBSD and NetBSD platforms implementation.�N)�defaultdict)�
namedtuple�)�_common)�_psposix)�_psutil_bsd)�
_psutil_posix)�FREEBSD)�NETBSD)�OPENBSD)�AccessDenied)�
NoSuchProcess)�
ZombieProcess)�	conn_tmap)�conn_to_ntuple)�memoize)�memoize_when_activated)�
usage_percent)�FileNotFoundError)�PermissionError)�ProcessLookupError)�which�
per_cpu_times�proc_num_threads�proc_open_files�proc_num_fds�ppid�status�real_uid��
effective_uid��	saved_uid��real_gid��
effective_gid��	saved_gid��ttynr��create_time�	�ctx_switches_vol�
�ctx_switches_unvol��
read_io_count��write_io_count�
�	user_time��sys_time��ch_user_time��ch_sys_time��rss��vms��memtext��memdata��memstack��cpunum��name��svmem)�total�	available�percent�used�free�active�inactive�buffers�cached�shared�wired�	scputimes��user�nice�system�idle�irq�pmem)r>r@�text�data�stack�	pcputimes)rZr\�
children_user�children_system�
pmmap_grouped�*path rss, private, ref_count, shadow_count�	pmmap_ext�6addr, perms path rss, private, ref_count, shadow_count�sdiskio)�
read_count�write_count�
read_bytes�write_bytes�	read_time�
write_time�	busy_time)rkrlrmrncCs�t��}|\}}}}}}}}trItdd��,}	|	D]!}
|
�d�r*t|
��d�d}q|
�d�r9t|
��d�d}qWd�n1sDwY|||}|||}t|||dd�}
t|||
||||||||�S)	z&System virtual memory as a namedtuple.z
/proc/meminfo�rbsBuffers:ris
MemShared:N��round_)	�cext�virtual_memr
�open�
startswith�int�splitrrL)�memrMrQrRrSrWrUrTrV�f�line�availrPrO�r�//usr/lib/python3/dist-packages/psutil/_psbsd.py�virtual_memory�s$

����r�cCs4t��\}}}}}t||dd�}t�||||||�S)z@System swap memory as (total, used, free, sin, sout) namedtuple.rrs)ru�swap_memrr�sswap)rMrPrQ�sin�soutrOrrr��swap_memory�sr�cCs"t��\}}}}}t|||||�S)z+Return system per-CPU times as a namedtuple)ru�	cpu_timesrXrYrrr�r��sr�cCs>g}t��D]}|\}}}}}t|||||�}|�|�q|S)�'Return system CPU times as a namedtuple)rurrX�append)�ret�cpu_trZr[r\r]r^�itemrrr�r�scCs.t�dkr	t�gStjrtd��dt_t�gS)r�r�&supported only starting from FreeBSD 8T)�cpu_count_logicalr�r�
__called__�NotImplementedErrorrrrr�r�s
FcC�t��S)z0Return the number of logical CPUs in the system.)rur�rrrr�r���r�cCst�dkrdSdS)Nr)r�rrrr��cpu_count_cores��r�cCs�d}t��}|dur5|�d�}|dkr5|d|d�}t�|�}zt|�d��p)d}W|��n|��w|s>t�dkr>dS|S)z-Return the number of CPU cores in the system.Nz	</groups>���r-zgroup/children/group/cpur)	ru�cpu_topology�rfind�ET�
fromstring�len�findall�clearr�)r��s�index�rootrrr�r�s


c	Cs�trt��\}}}}}nBtrAt��\}}}}}}}tdd��}|D]}|�d�r0t|��d�}q!Wd�n1s;wYn
trNt��\}}}}}}}t	�
||||�S)z*Return various CPU stats as a named tuple.z
/proc/statrrsintrrN)r	ru�	cpu_statsr
rwrxryrzrr�	scpustats)	�ctxsw�intrs�
soft_intrs�syscalls�traps�faults�forksr|r}rrr�r�s"�
�����r�c	CsLg}t��}|D]}|\}}}}d}}	t�||||||	�}
|�|
�q|S)z�Return mounted disk partitions as a list of namedtuples.
    'all' argument is ignored, see:
    https://github.com/giampaolo/psutil/issues/906
    N)ru�disk_partitionsr�	sdiskpartr�)�all�retlist�
partitions�	partition�device�
mountpoint�fstype�opts�maxfile�maxpath�ntuplerrr�r�>s�r�cCs�t���}i}|D]C}zt�|�}t�|�}t�|�\}}Wnty7}z
|jtjkr-�WYd}~q	d}~wwt	t
d�rBt
�|�}t
�||||�||<q	|S)z)Get NIC stats (isup, duplex, speed, mtu).N�	NicDuplex)
�net_io_counters�keys�
cext_posix�
net_if_mtu�net_if_is_running�net_if_duplex_speed�OSError�errno�ENODEV�hasattrrr��	snicstats)�namesr�rJ�mtu�isup�duplex�speed�errrrr��net_if_stats[s"


���

r�c
Cstr7g}t�D]-}z	t|��|�}WnttfyYqw|D]}t|�}|�|�|�tj	|��q q|S|tj
vrLtd|d�dd�t
D��f��t
|\}}t
�}tr]t�d�}nt��}|D]#}|\}	}
}}}
}}|
|vr�||vr�t|	|
|||
|t|�}|�|�qct|�S)z System-wide network connections.�+invalid %r kind argument; choose between %s�, cS�g|]}t|��qSr��repr��.0�xrrr��
<listcomp>��z#net_connections.<locals>.<listcomp>r�)r�pids�Process�connectionsr
r�listr�r�sconnr�
ValueError�join�setr
ru�net_connectionsr�TCP_STATUSES�add)�kindr��pid�cons�conn�families�types�rawlistr��fd�fam�type�laddr�raddrr�ntrrr�r�os@
�
�
��
�r�cCsbz	t��\}}}Wn
tyYdSw|dk}|rtj}n|dkr&tj}n|d}t�|||�S)zReturn battery info.Nrr��<)ru�sensors_batteryr�r�POWER_TIME_UNLIMITED�POWER_TIME_UNKNOWN�sbattery)rO�minsleft�
power_plugged�secsleftrrr�r��s�r�c	Csrtt�}t�}t|�D]+}z t�|�\}}|dkrd}d|}|d�t�||||��Wqt	y6Yqw|S)z?Return CPU cores temperatures if available, else an empty dict.rNzCore %s�coretemp)
rr�r��rangeru�sensors_cpu_temperaturer�r�shwtempr�)r��num_cpus�cpu�current�highrJrrr��sensors_temperatures�s��r�c
Cs�g}t�}t|�D]]}z	t�|�\}}Wn	tyYq	w|r\zt|�d�d�d�d�}Wn
ttfy=d}Ynwzt|�d�d�d�d�}Wn
ttfy[d}Ynw|�	t
�|||��q	|S)z�Return frequency metrics for CPUs. As of Dec 2018 only
        CPU 0 appears to be supported by FreeBSD and all other cores
        match the frequency of CPU 0.
        � r��/rN)r�r�ru�
cpu_frequencyr�ryrz�
IndexErrorr�r�r�scpufreq)r�r�r�r��available_freq�min_freq�max_freqrrr��cpu_freq�s*� � �rcCr�)z:The system boot time expressed in seconds since the epoch.)ru�	boot_timerrrr�r�r�rc	Csfg}t��}|D](}|\}}}}}|dkrtsJ�d}|dkr qt�||p&d|||�}|�|�q|S)z:Return currently connected users as a list of namedtuples.r�N�~)ru�usersrr�suserr�)	r�r�r�rZ�tty�hostname�tstampr�r�rrr�r�srcCs:z	td���WdStyYdStyYdSw)NrFT)r�rJr
rrrrr��
_pid_0_exists�s��rcCs*t��}trd|vrt�r|�dd�|S)z7Returns a list of PIDs currently running on the system.r)rur�rr�insert)r�rrr�r��sr�cCst�|�}|s|t�vSdS)zReturn True if pid exists.T)r�
pid_existsr�)r��existsrrr�r	s

rcCs4zt�|�td}|tjkWStyYdSw)NrF)ru�proc_oneshot_info�kinfo_proc_map�SZOMB�	Exception)r��strrr��	is_zombies�rcst����fdd��}|S)z`Decorator which translates bare OSError exceptions into
    NoSuchProcess and AccessDenied.
    cs�z�|g|�Ri|��WSty(t|j�r!t|j|j|j��t|j|j��ty5t|j|j��t	yN|jdkrMdt
�vrLt|j|j����w�Nr)rrr�r�_name�_ppidr
rrr�r�)�self�args�kwargs��funrr��wrapper"s


�z wrap_exceptions.<locals>.wrapper)�	functools�wraps)rrrrr��wrap_exceptionssr!c	csf�zdVWdSttfy%t|j�rt|j|j|j��t|j|j��ty2t	|j|j��w)z8Same as above, for routines relying on reading /proc fs.N)
rrrr�rrrr
rr)�instrrr��wrap_exceptions_procfs7s�
�r#c@s�eZdZdZgd�Zdd�Zdd�Zeedd���Z	d	d
�Z
dd�Zed
d��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd��Zer`edd ��Zed!d"��ZeZed#d$��Zed%d&��Zed'd(��Zed)d*��ZedLd,d-��ZedMd/d0��Zed1d2��Zed3d4��Z ed5d6��Z!ed7d8��Z"ed9d:��Z#e$d;d<�Z%e$d;d=�Z&d>d?�Z'e(r�ed@dA��Z)ne'Z)e*r�edBdC��Z+ne'Z+er�edDdE��Z,edFdG��Z-edHdI��Z.edMdJdK��Z/d.Sd.S)Nr�z1Wrapper class around underlying C implementation.)r�rr�_cachecCs||_d|_d|_dS�N)r�rr)rr�rrr��__init__Ms
zProcess.__init__cCst�|j�dS)z+Raise NSP if the process disappeared on us.N)ru�	proc_namer��rrrr��
_assert_aliveRszProcess._assert_alivecCs$t�|j�}t|�tt�ksJ�|S)z;Retrieves multiple process info in one shot as a raw tuple.)rurr�r�r�rr�rrr��oneshotXszProcess.oneshotcC�|j�|�dSr%)r+�cache_activater(rrr��
oneshot_enter`�zProcess.oneshot_entercCr,r%)r+�cache_deactivater(rrr��oneshot_exitcr/zProcess.oneshot_exitcCs(|��td}|dur|St�|j�S)NrJ)r+rrur'r�)rrJrrr�rJfszProcess.namecCs�tr|jdkr	dSt�|j�Str6|jdkrdSt|��t�d|j�Wd�S1s/wYdS|��}|rDt	|d�pCdSdS)Nr�z/proc/%s/exe)
r	r�ru�proc_exer
r#�os�readlink�cmdliner)rr6rrr��exeks


$�zProcess.exec
Cs�tr	|jdkr	gStrJzt�|j�WStyI}z+|jtjkrDt|j�r.t	|j|j
|j��t|j�s<t
|j|j
|j��gWYd}~S�d}~wwt�|j�Sr)rr�r
ru�proc_cmdliner�r��EINVALrrrrrr
)rr�rrr�r6�s 

��
zProcess.cmdlinecC�t�|j�Sr%)ru�proc_environr�r(rrr��environ��zProcess.environcCs8|��td}t��}z||WStyYdSw)Nr*)r+rr�get_terminal_map�KeyError)r�tty_nr�tmaprrr��terminal�s
�zProcess.terminalcCs|��td|_|jS)Nr)r+rrr(rrr�r�szProcess.ppidcC�.|��}t�|td|td|td�S)Nrr r")r+r�puidsr�r�rawtuplerrr��uids��


�zProcess.uidscCrC)Nr$r&r()r+r�pgidsrrErrr��gids�rHzProcess.gidscCs8|��}t�|td|td|td|td�S)Nr6r8r:r<)r+rrcrrErrr�r��s



�zProcess.cpu_timescC�|��tdS)NrH�r+rr(rrr��cpu_num��zProcess.cpu_numcCs@|��}t|td|td|td|td|td�S)Nr>r@rBrDrF)r+r_rrErrr��memory_info�s




�zProcess.memory_infocCrK)Nr,rLr(rrr�r,�rNzProcess.create_timecCstrt�|j�St|���Sr%)�HAS_PROC_NUM_THREADSrurr�r��threadsr(rrr��num_threads�szProcess.num_threadscCs$|��}t�|td|td�S)Nr.r0)r+r�pctxswrrErrr��num_ctx_switches�s


�zProcess.num_ctx_switchescCsHt�|j�}g}|D]\}}}t�|||�}|�|�q
tr"|��|Sr%)ru�proc_threadsr�r�pthreadr�rr))rr�r��	thread_id�utime�stimer�rrr�rQ�szProcess.threads�inetc	Cs|tvrtd|d�dd�tD��f��trXt|\}}g}t�|j�}|D])}|\}}}	}
}}}
|
|jks8J�||vrO|	|vrOt|||	|
||t�}|�	|�q&|�
�t|�St|\}}t�|j||�}g}|D]}|\}}}	}
}}t|||	|
||t�}|�	|�qjt
r�|�
�|S)Nr�r�cSr�rr�r�rrr�r��r�z'Process.connections.<locals>.<listcomp>)rr�r�r
rur�r�rr�r�r)r��proc_connectionsr)rr�r�r�r�r�r�r�r�r�r�r�rr�r�rrr�r��s>��
��zProcess.connectionsNcCst�|j||j�Sr%)r�wait_pidr�r)r�timeoutrrr��waitr�zProcess.waitcCr:r%)r��getpriorityr�r(rrr��nice_getr=zProcess.nice_getcCst�|j|�Sr%)r��setpriorityr�)r�valuerrr��nice_set"szProcess.nice_setcCs|��td}t�|d�S)Nr�?)r+r�
PROC_STATUSES�get)r�coderrr�r&szProcess.statuscCs(|��}t�|td|tddd�S)Nr2r4r�)r+r�piorrErrr��io_counters,s

�zProcess.io_counterscCs<tr	|jdkr	dSts
trt�|j�pdSttrd��d��)z)Return process current working directory.rNr�r2)rr�r
�HAS_PROC_OPEN_FILESru�proc_cwdr�r	r(rrr��cwd5s���zProcess.cwd�mmaprgricCst�r%)r�r(rrr��_not_implementedJszProcess._not_implementedcCst�|j�}dd�|D�S)z8Return files opened by process as a list of namedtuples.cSsg|]
\}}t�||��qSr)r�	popenfile)r��pathr�rrr�r�Tsz&Process.open_files.<locals>.<listcomp>)rurr�)rr�rrr��
open_filesPszProcess.open_filescCst�|j�}tr|��|S)z=Return the number of file descriptors opened by this process.)rurr�r
r)r*rrr��num_fds[szProcess.num_fdscCr:r%)ru�proc_cpu_affinity_getr�r(rrr��cpu_affinity_getir=zProcess.cpu_affinity_getc
Cs�tttt����}|D]}||vrtd||f��qz
t�|j|�WdStyK}z|j	t	j
t	jfvrF|D]}||vrEtd||f��q7�d}~ww)Nz#invalid CPU #%i (choose between %s))�tupler�r�rr�ru�proc_cpu_affinity_setr�r�r�r9�EDEADLK)r�cpus�allcpusr�r�rrr��cpu_affinity_setms,�������zProcess.cpu_affinity_setcCr:r%)ru�proc_memory_mapsr�r(rrr��memory_maps�r=zProcess.memory_mapscCsL|durt�|j|�St|�dkrtdt|���|\}}t�|j|||�S)Nrz4second argument must be a (soft, hard) tuple, got %s)ru�proc_getrlimitr�r�r�r��proc_setrlimit)r�resource�limits�soft�hardrrr��rlimit�s��zProcess.rlimit)rZr%)0�__name__�
__module__�__qualname__�__doc__�	__slots__r&r)r!rr+r.r1rJr7r6r<rBrrGrJr�r	rMrO�memory_full_infor,rRrTrQr�r^r`rcrrirlr�nt_mmap_grouped�nt_mmap_extrnrjrq�HAS_PROC_NUM_FDSrrrtrzr|r�rrrr�r�Hs�










	



!




��


�r�r)F)~r��
contextlibr�rr4�xml.etree.ElementTree�etree�ElementTreer��collectionsrrr2rrrrurr�r	r
rrr
rrrrrr�_compatrrrr�__extra__all__�SIDL�STATUS_IDLE�SRUN�STATUS_RUNNING�SSLEEP�STATUS_SLEEPING�SSTOP�STATUS_STOPPEDr�
STATUS_ZOMBIE�SWAIT�STATUS_WAITING�SLOCK�
STATUS_LOCKEDre�SDEAD�
STATUS_WAKING�SONPROC�TCPS_ESTABLISHED�CONN_ESTABLISHED�
TCPS_SYN_SENT�
CONN_SYN_SENT�TCPS_SYN_RECEIVED�
CONN_SYN_RECV�TCPS_FIN_WAIT_1�CONN_FIN_WAIT1�TCPS_FIN_WAIT_2�CONN_FIN_WAIT2�TCPS_TIME_WAIT�CONN_TIME_WAIT�TCPS_CLOSED�
CONN_CLOSE�TCPS_CLOSE_WAIT�CONN_CLOSE_WAIT�
TCPS_LAST_ACK�
CONN_LAST_ACK�TCPS_LISTEN�CONN_LISTEN�TCPS_CLOSING�CONN_CLOSING�PSUTIL_CONN_NONE�	CONN_NONEr��getpagesize�PAGESIZE�AF_LINKr��HAS_PER_CPU_TIMESrPrjr��dictrrLrXr_�pfullmemrcrfrhrjr�r�r�rr�r�r�r�r��
disk_usage�disk_io_countersr��net_if_addrsr�r�r�r�rrrrr�rrr!�contextmanagerr#�objectr�rrrr��<module>sh�	��
�



��������	�
���
�������������#�����	
	

#(






Youez - 2016 - github.com/yon3zu
LinuXploit