관리-도구
편집 파일: test_posix.cpython-311.pyc
� P�Dg'; � �| � d Z ddlZddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm Z ddlmZ ddlmZ ddlm Z dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ e rddlZddlZddlmZ d%d�Z d� Z!d� Z"d� Z#d� Z$ ej% e d� � G d� de� � � � Z& ej% e d� � G d� d e� � � � Z' ej% e d� � G d!� d"e� � � � Z(e)d#k rdd$l*m+Z+ e+e,� � dS dS )&zPOSIX specific tests.� N)�AIX)�BSD)�LINUX)�MACOS)�OPENBSD)�POSIX)�SUNOS)� CI_TESTING)�spawn_testproc)�HAS_NET_IO_COUNTERS)�mock)�PsutilTestCase)� PYTHON_EXE)�retry_on_failure)�sh)�skip_on_access_denied)� terminate)�unittest)�which)�getpagesizec �� � dg}t r|� d� � |�%|� dt |� � g� � n9t st r|� d� � n|� d� � t r%t d� � }|� | | � � } |� d| g� � t |� � }t r|� � � }n|� � � d d� }g }|D ]L}|� � � } t |� � }n# t $ r Y nw xY w|� |� � �M|�|S |d S )z| Wrapper for calling the ps command with a little bit of cross-platform support for a narrow range of features. �psz--no-headersNz-pz-A�ax)�command�comm�start�stimez-o� r ) r �append�extend�strr r �set�getr � splitlines�strip�int� ValueError)�fmt�pid�cmd�fmt_map�output� all_output�lines �y/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/psutil/tests/test_posix.pyr r - s� � � �&�C�� #�� � �>�"�"�"� ��� � �D�#�c�(�(�#�$�$�$�$�� �C� ��J�J�t������J�J�t����� $��;�<�<���k�k�#�s�#�#���J�J��c�{���� ��W�W�F�� )��"�"�$�$����"�"�$�$�Q�R�R�(���J�� � ���z�z�|�|�� ��t�9�9�D�D��� � � ��D� ���� ���$����� �{����!�}�s �%D5�5 E�Ec �h � d}t rd}t || � � � � � d S )Nr r r )r r �split�r) �fields r/ �ps_namer4 i s3 � ��E�� ��� �e�S�>�>���!�!�!�$�$� c �F � d}t st rd}t || � � S )Nr �args)r r r r2 s r/ �ps_argsr8 p s) � ��E� � �e� ��� �e�S�>�>�r5 c �8 � d}t rd}t || � � S )N�rss�rssize�r r r2 s r/ �ps_rssr= w s"