[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.225.234.226: ~ $
U

xe�_��@s�dZddlZddlmZddlmZddlmZddlmZddlZe�ed�Gdd	�d	e��Z	e
d
kr~ddlmZee
�dS)zAIX specific tests.�N)�AIX)�PsutilTestCase)�sh)�unittestzAIX onlyc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�AIXSpecificTestCasecCs�td�}d}d��D]}|d|f7}qt�||�}|�|d�d}t|�d��|}t|�d��|}t|�d	��|}t|�d
��|}	t��}
d||}|�	|
j
|�|j|
j||d�|j|
j
||d�|j|
j|	|d�dS)
Nz/usr/bin/svmon -O unit=KBz	memory\s*z+size inuse free pin virtual available mmode�(?P<%s>\S+)\s+z(svmon command returned unexpected outputi�size�	availableZinuse�free��Zdelta)r�split�re�search�assertIsNotNone�int�group�psutilZvirtual_memory�assertEqual�total�assertAlmostEqual�usedr	r
)�self�out�
re_pattern�field�matchobjZKBrr	rr
�
psutil_resultZTOLERANCE_SYS_MEM�r�H/opt/alt/python38/lib64/python3.8/site-packages/psutil/tests/test_aix.py�test_virtual_memorys@����z'AIXSpecificTestCase.test_virtual_memorycCsTtd�}t�d|�}|�|d�t|�d��}d}t��}|�t|j	|�|�dS)Nz/usr/sbin/lsps -az=(?P<space>\S+)\s+(?P<vol>\S+)\s+(?P<vg>\S+)\s+(?P<size>\d+)MBz'lsps command returned unexpected outputri)
rrrrrrrZswap_memoryrr)rrrZtotal_mbZMBrrrr�test_swap_memory5s��z$AIXSpecificTestCase.test_swap_memorycCs�td�}d}d��D]}|d|f7}qt�||�}|�|d�d}t��}|j|jt	|�
d��|d�|j|jt	|�
d	��|d�|j|jt	|�
d
��|d�|j|j
t	|�
d��|d�dS)N�/usr/bin/mpstat -azALL\s*zfmin maj mpcs mpcr dev soft dec ph cs ics bound rq push S3pull S3grd S0rd S1rd S2rd S3rd S4rd S5rd syscrz)mpstat command returned unexpected outputi�ZcsrZsyscZdevZsoft)rr
rrrrZ	cpu_statsrZctx_switchesrrZsyscallsZ
interruptsZsoft_interrupts)rrrrrZCPU_STATS_TOLERANCErrrr�test_cpu_statsJs>�����z"AIXSpecificTestCase.test_cpu_statscCs:td�}tt�d|��d��}tjdd�}|�||�dS)Nr"z
lcpu=(\d+)�T)Zlogical)rrrrrr�	cpu_countr)rrZmpstat_lcpuZpsutil_lcpurrr�test_cpu_count_logicalksz*AIXSpecificTestCase.test_cpu_count_logicalcCs4td�}t|���}tt�����}|�||�dS)Nz/etc/ifconfig -l)r�setr
rZnet_if_addrs�keysZassertSetEqual)rrZifconfig_namesZpsutil_namesrrr�test_net_if_addrs_namesqsz+AIXSpecificTestCase.test_net_if_addrs_namesN)�__name__�
__module__�__qualname__r r!r#r&r)rrrrrs
!r�__main__)�
run_from_name)�__doc__rrrZpsutil.testsrrrZskipIfrr*Zpsutil.tests.runnerr.�__file__rrrr�<module>	sc

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 44.89 KB 0644
__init__.cpython-38.pyc File 46.44 KB 0644
__main__.cpython-38.opt-1.pyc File 285 B 0644
__main__.cpython-38.pyc File 285 B 0644
runner.cpython-38.opt-1.pyc File 10.84 KB 0644
runner.cpython-38.pyc File 10.84 KB 0644
test_aix.cpython-38.opt-1.pyc File 3.3 KB 0644
test_aix.cpython-38.pyc File 3.3 KB 0644
test_bsd.cpython-38.opt-1.pyc File 19.53 KB 0644
test_bsd.cpython-38.pyc File 19.53 KB 0644
test_connections.cpython-38.opt-1.pyc File 15.13 KB 0644
test_connections.cpython-38.pyc File 15.43 KB 0644
test_contracts.cpython-38.opt-1.pyc File 24.81 KB 0644
test_contracts.cpython-38.pyc File 25.64 KB 0644
test_linux.cpython-38.opt-1.pyc File 67.56 KB 0644
test_linux.cpython-38.pyc File 68.67 KB 0644
test_memleaks.cpython-38.opt-1.pyc File 22.59 KB 0644
test_memleaks.cpython-38.pyc File 22.59 KB 0644
test_misc.cpython-38.opt-1.pyc File 22.69 KB 0644
test_misc.cpython-38.pyc File 22.92 KB 0644
test_osx.cpython-38.opt-1.pyc File 7.1 KB 0644
test_osx.cpython-38.pyc File 7.1 KB 0644
test_posix.cpython-38.opt-1.pyc File 12.36 KB 0644
test_posix.cpython-38.pyc File 12.46 KB 0644
test_process.cpython-38.opt-1.pyc File 45.69 KB 0644
test_process.cpython-38.pyc File 46.52 KB 0644
test_sunos.cpython-38.opt-1.pyc File 1.5 KB 0644
test_sunos.cpython-38.pyc File 1.5 KB 0644
test_system.cpython-38.opt-1.pyc File 25.65 KB 0644
test_system.cpython-38.pyc File 26.92 KB 0644
test_testutils.cpython-38.opt-1.pyc File 15.6 KB 0644
test_testutils.cpython-38.pyc File 16.27 KB 0644
test_unicode.cpython-38.opt-1.pyc File 10.87 KB 0644
test_unicode.cpython-38.pyc File 10.87 KB 0644
test_windows.cpython-38.opt-1.pyc File 27.81 KB 0644
test_windows.cpython-38.pyc File 28 KB 0644