관리-도구
편집 파일: test_aix.cpython-311.pyc
� P�Dg� � �� � d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlZ ej e d� � G d� d e� � � � Z e d k rddlmZ ee � � dS dS )zAIX specific tests.� N)�AIX)�PsutilTestCase)�sh)�unittestzAIX onlyc �, � e Zd Zd� Zd� Zd� Zd� Zd� ZdS )�AIXSpecificTestCasec � � t d� � }d}d� � � D ]}|d|�d�z }�t j ||� � }| � |d� � d}t |� d� � � � |z }t |� d � � � � |z }t |� d � � � � |z }t |� d� � � � |z } t j � � } d|z |z }| � | j |� � | � | j ||� � � | � | j ||� � � | � | j | |� � � d S )Nz/usr/bin/svmon -O unit=KBz memory\s*z+size inuse free pin virtual available mmode�(?P<�>\S+)\s+z(svmon command returned unexpected outputi �size� available�inuse�free� ��delta)r �split�re�search�assertIsNotNone�int�group�psutil�virtual_memory�assertEqual�total�assertAlmostEqual�usedr r )�self�out� re_pattern�field�matchobj�KBr r r r � psutil_result�TOLERANCE_SYS_MEMs �w/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/psutil/tests/test_aix.py�test_virtual_memoryz'AIXSpecificTestCase.test_virtual_memory s� � ��,�-�-��!� �C�J�J�L�L� 7� 7�E��J�u�u�u�6�6�J�J��9�Z��-�-������@� B� B� B� ���H�N�N�6�*�*�+�+�b�0������{�3�3�4�4�r�9� ��8�>�>�'�*�*�+�+�b�0���8�>�>�&�)�)�*�*�R�/���-�/�/� � ��F�R�K������,�e�4�4�4�������,=� � ?� ?� ?�����#�Y�6G� � I� I� I�������,=� � ?� ?� ?� ?� ?� c �> � t d� � }t j d|� � }| � |d� � t |� d� � � � }d}t j � � }| � t |j |z � � |� � d S )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 outputr i ) r r r r r r r �swap_memoryr r )r r r# �total_mb�MBr% s r'