403Webshell
Server IP : 159.223.102.202  /  Your IP : 216.73.216.195
Web Server : nginx/1.26.0
System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User : albasshbotta ( 1021)
PHP Version : 8.2.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/iotop/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/iotop/__pycache__/ui.cpython-312.pyc
�

w�&b�q���ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZ	eed�s
ddl
m
Z
e
e_
ddlmZddlmZmZmZmZmZddlmZddlmZdd	lmZdd
lmZgd�Zd�Z d
�Z!d�Z"d�Z#d�Z$e$�Z%Gd�de&�Z'Gd�de&�Z(Gd�de&�Z)Gd�de&�Z*Gd�de&�Z+Gd�de,�Z-d�Z.d�Z/d�Z0d e
jbdzZ2d!�Z3y#eef$reje_
Y��wxYw)"�)�print_functionN�	monotonic)r)�OrderedDict)�	find_uids�TaskStatsNetlink�ProcessList�Stats�sysctl_task_delayacct)�
ThreadInfo)�VERSION)�ioprio)�IoprioSetError)�B�K�M�G�T�P�Ec��|dkDrd}n|dkrd}|}nyttj|dzd�dz�}d|t|�dd|zzzt|fzS)	Nr��-z0.00 B��
z	%s%.2f %s�)�int�math�log�float�UNITS)�size�sign�expos   �*/usr/lib/python3/dist-packages/iotop/ui.py�
human_sizer%;sq���a�x���	
������u����t�x�x��q��!�$�r�)�*�D���u�T�{�a�B��I�.�/�%��+�?�?�?�c�@�|jrd|dzzSt|�S)Nz%.2f Kg�@)�	kilobytesr%)�options�bytess  r$�format_sizer+Is%������5�6�>�*�*��e��r&c�@�t||xrt|�|z�dzS)Nz/s)r+r)r)r!�durations   r$�format_bandwidthr.Os"���w�� ?��t��x�)?�@�4�G�Gr&c�����fd�}�jr3|j}�fd�}tj�|jz
�n|j
}�fd�}||j�}||j�}||j��}|j|jz
}	td|	�}	||	��}
||||
fS)Nc�.��dtd|�dzz�zS)Nz%.2f %%g��(\�X@g�cA)�min)�delayr-s �r$�
delay2percentz#format_stats.<locals>.delay2percentVs����3�u�e�x�*�/D�&E�F�F�Fr&c���t�|�S�N)r+�r!r-r)s  �r$�<lambda>zformat_stats.<locals>.<lambda>Zs����G�T�0J�r&c���t�||�Sr5)r.r6s  �r$r7zformat_stats.<locals>.<lambda>^s���0@�7>��h�1P�r&r)�accumulated�stats_accum�timer�stats_accum_timestamp�stats_delta�blkio_delay_total�swapin_delay_total�
read_bytes�write_bytes�cancelled_write_bytes�max)r)�processr-r3�stats�display_format�io_delay�swapin_delayr@�
written_bytesrAs` `        r$�format_statsrJSs����G�����#�#��J���>�>�#�g�&C�&C�C���#�#��P���U�4�4�5�H� ��!9�!9�:�L��� 0� 0�(�;�J��%�%��(C�(C�C�M���=�)�M� ���9�K��\�:�{�:�:r&c��	ttd�j�j��S#t$r}t|�Yd}~yd}~wwxYw)Nz/proc/sys/kernel/pid_max�)�len�open�read�strip�	Exception�print)�es r$�get_max_pid_widthrTisD����4�2�3�8�8�:�@�@�B�C�C����
�a�����s�/2�	A�A�Ac��eZdZy)�CancelInputN��__name__�
__module__�__qualname__�r&r$rVrVx���r&rVc��eZdZy)�
InvalidIntNrWr[r&r$r^r^|r\r&r^c��eZdZy)�
InvalidPidNrWr[r&r$r`r`�r\r&r`c��eZdZy)�
InvalidTidNrWr[r&r$rbrb�r\r&rbc��eZdZy)�InvalidIoprioDataNrWr[r&r$rdrd�r\r&rdc	���eZdZd�dfd�dfd�dfd�dfd�dfd�dfd	�dfd
�dfgZd�Zd�Zd
�Zd�Zd�Zd�Z	dd�Z
dd�Zd�Zd�Z
d�Zd�Zdd�Zd d�Zd�Zd�Zd�Zd�Zy)!�IOTopUIc��|jSr5)�pid��p�ss  r$r7zIOTopUI.<lambda>�s
��a�e�e�r&Fc�"�|j�Sr5)�ioprio_sort_keyris  r$r7zIOTopUI.<lambda>�s��a�'�'�)�r&c�"�|j�Sr5)�get_userris  r$r7zIOTopUI.<lambda>�s��a�j�j�l�r&c��|jSr5)r@ris  r$r7zIOTopUI.<lambda>�s
��a�l�l�r&Tc�4�|j|jz
Sr5)rArBris  r$r7zIOTopUI.<lambda>�s��a�m�m�a�&=�&=�=�r&c��|jSr5)r?ris  r$r7zIOTopUI.<lambda>�s��a�*�*�r&c�h�|jxs%t|jxs|j�Sr5)r>rr@rAris  r$r7zIOTopUI.<lambda>�s0��a�)�)�C��!�,�,�"?�!�-�-�@�A�B�r&c�"�|j�Sr5)�get_cmdlineris  r$r7zIOTopUI.<lambda>�s��a�m�m�o�r&c��||_||_d|_tj|jd|_|jjsV||_|j�	tj�tj�tjd�yy#tj$rYywxYw)N�rr)�process_listr)�sorting_keyrf�sorting_keys�sorting_reverse�batch�win�resize�curses�use_default_colors�start_color�curs_set�error)�selfr}rxr)s    r$�__init__zIOTopUI.__init__�s���(���������&�3�3�D�4D�4D�E�a�H����|�|�!�!��D�H��K�K�M�
��)�)�+��"�"�$�����"�
"���<�<�
��
�s�)=B(�(B>�=B>c�R�|jj�\|_|_yr5)r}�getmaxyx�height�width�r�s r$r~zIOTopUI.resize�s��"&�(�(�"3�"3�"5����T�Zr&c���d}tj�}|jjsM|j	t
jj�tjtjz�|jj�||jjk�rx|jj�\}}|j|dk(|||jj�|jj�|dz
}||jjk\ry|dk(rd}	|j|jjdz�}|D]?\}}|tj(tj*zzs�+tj,d��A|jjs|j/�|r+|j0j3�}	|j5|	�|jj���\||jjkr��wyy#tj $r;}|j"r#|j"dt$j&k(rg}n�Yd}~��d}~wwxYw)Nrrg@�@)�select�pollr)r|�register�sys�stdin�fileno�POLLIN�POLLPRI�
iterationsrx�refresh_processes�refresh_displayr-�
delay_secondsr��args�errno�EINTR�POLLERR�POLLHUP�exitr~r}�getch�
handle_key)
r�r�r��total�current�eventsrS�fd�event�keys
          r$�runzIOTopUI.run�s����
��{�{�}���|�|�!�!��M�M�#�)�)�*�*�,�f�m�m�f�n�n�.L�M��l�l�%�%�-��4�<�<�2�2�2�!�.�.�@�@�B�N�E�7�� � ��q��%��!%�!2�!2�!;�!;�
=��|�|�&�&�2��a��
�����!8�!8�8���q���
�
����4�<�<�#=�#=��#F�G�� &�
 ���U��F�N�N�V�^�^�;�<��H�H�Q�K�
 ��<�<�%�%����
���h�h�n�n�&������$�5�l�l�%�%�-��4�<�<�2�2�2���<�<�
��6�6�a�f�f�Q�i�5�;�;�6��F����
�s�/(H#�#I1�60I,�,I1c�(�|j|_yr5)r{r�s r$�reverse_sortingzIOTopUI.reverse_sorting�s��#'�#7�#7�7��r&c��|j}|j|�|_||jk7r&tj|jd|_yy�Nr)ry�get_sorting_keyrfrzr{)r��delta�orig_sorting_keys   r$�adjust_sorting_keyzIOTopUI.adjust_sorting_key�sR���+�+���/�/��6����t�/�/�/�#*�#7�#7��8H�8H�#I�!�#L�D� �0r&c���|j}||z
}td|�}tttj
�dz
|�}|js|dvr|dkrd}|S|dkDrd}|S)Nrr�rLrw��)ryrCr1rMrfrz�
has_swapin_io)r�r��new_sorting_keys   r$r�zIOTopUI.get_sorting_key�sx���*�*���5� ���a��1���c�'�"6�"6�7�!�;�_�M���!�!��&�(��A�:�&'�O����Q�Y�&'�O��r&Nc�(�|jjddtd�tjz|j
�|jj
dd|tj�|jj�tj�tjd�|jjdt|��}tjd�tj�|dvr|S|r
t��|S)Nrr� )Nr)r}�hline�ordr�A_NORMALr��addstr�A_BOLD�refresh�echor��getstrrM�noechorV�r��prompt�default�empty_is_cancel�inps     r$�
prompt_strzIOTopUI.prompt_str�s��������q�!�S��X����7����D�������1�f�f�m�m�4����������
�������h�h�o�o�a��V��-��������
�
���j� ��J���-���r&c�n�|j|||�}	t|�S#t$rt��wxYwr5)r�r�
ValueErrorr^r�s     r$�
prompt_intzIOTopUI.prompt_int�s9���o�o�f�g��?��	��s�8�O���	��,��	�s�
 �4c�f�	|jd�S#t$rt��t$r�wxYw)NzPID to ionice: )r�r^r`rVr�s r$�
prompt_pidzIOTopUI.prompt_pid�9��	��?�?�#4�5�5���	��,���	��	����0c�f�	|jd�S#t$rt��t$r�wxYw)NzTID to ionice: )r�r^rbrVr�s r$�
prompt_tidzIOTopUI.prompt_tidr�r�c��	|�|jd|z|d�}n|jddd�}|dks|dkDr
t��|S#t$rt��wxYw)Nz'I/O priority data (0-7, currently %s): FzI/O priority data (0-7): rr�)r�r^rd)r��ioprio_datar�s   r$�prompt_datazIOTopUI.prompt_datasx��	&��&��o�o�&O�(3�'4�5@�%�I���o�o�&A�4��O����7�c�A�g�#�%�%��
��	�	&�#�%�%�	&�s�,A�Ac	��	|j|�}t|�dz
}	|jj	ddtd�tjz|j�|jjdd|tj�t|�}t|�D][\}}d|z}	||urtj}
ntj}
|jjd||	|
�|t|	�z
}�]	|jj�}|tjtd�fvr|dkDr|dz}n�|tjtd�fvr||kr|dz
}n}|tj td�td	�fvr||S|d
tj"tj$tj&td�td�fvr
t)������#t$rd}Y���wxYw)
N���rrr�� %s �l�r�
�
��q�Q)�indexr�rMr}r�r�rr�r��insstrr��	enumerate�	A_REVERSEr��KEY_LEFT�	KEY_RIGHT�	KEY_ENTER�
KEY_CANCEL�	KEY_CLOSE�KEY_EXITrV)r�r��display_list�ret_list�selected�set_len�offset�i�item�display�attrr�s            r$�
prompt_setzIOTopUI.prompt_set s���	��~�~�h�/�H��l�#�a�'����H�H�N�N�1�a��S��F�O�O�!;�T�Z�Z�H��H�H�O�O�A�q�&�&�-�-�8���[�F�$�\�2�
'���4� �4�-����=�!�+�+�D�!�?�?�D�������6�7�D�9��#�g�,�&��
'���h�h�n�n�&���6�?�?�C��H�5�5�(�Q�,���M�H���f�.�.��C��9�9���(���M�H���V�-�-�s�4�y�#�d�)�D�D�#�H�-�-��R��!2�!2�F�4D�4D�#�_�_�c�#�h��C��B�B�%�-�'�����	��H�	�s�G.�.G=�<G=c�J�d}gd�}gd�}|�d}|j||||�}|S)NzI/O priority class: )z	Real-timezBest-effort�Idle)�rt�be�idler)r�)r��ioprio_classr��classes_prompt�classes_retr�s      r$�prompt_classzIOTopUI.prompt_classAs8��'��=��*�����L��o�o�f�n�)�<�9���
r&c�D�|jjddtd�tjz|j
�|jj
ddd|ztj�|jj�tjd�y)Nrrr�z  %s  )r}r�r�rr�r�r�r�r�r;�sleep)r�r�s  r$�prompt_errorzIOTopUI.prompt_errorKse�������q�!�S��X����7����D�������1�h��.��0@�0@�A��������
�
�1�
r&c��|jjddtd�tjz|j
�|jj
�y)Nrrr�)r}r�r�rr�r�r�r�s r$�prompt_clearzIOTopUI.prompt_clearQs9�������q�!�S��X����7����D������r&c�6���fd�}�fd�}�fd�}�fd�}itd�d��td�d��td	��fd
��td��fd��td
�|�td�|�td�|�td�|�td�|�td�|�td�|�td�|�tj�fd��tj�fd��tj�fd��tj
�fd��}|j
|d��}|�y)Nc�D���jxjdzc_y�NT)r)r9r�s�r$�toggle_accumulatedz.IOTopUI.handle_key.<locals>.toggle_accumulatedVs����L�L�$�$��,�$r&c�D���jxjdzc_yr)r)�onlyr�s�r$�toggle_only_ioz*IOTopUI.handle_key.<locals>.toggle_only_ioYs����L�L����%�r&c����jxjdzc_�jj��jj	�yr)r)�	processesrx�clearr�r�s�r$�toggle_processesz,IOTopUI.handle_key.<locals>.toggle_processes\s<����L�L�"�"�d�*�"����#�#�%����/�/�1r&c���	�jjr,�j�}�jj	|�}n0�j�}t
|�jj�}|j�}tj|�\}}�j|�}|dk(rd}n�j|�}|j||��jj��jj��j!�y#t"$r(}�j%d|j&z�Yd}~yd}~wt($r�j%d�Yyt*$r�j%d�Yyt,$r�j%d�Yyt.$r�j%d�Yyt0$r�j!�YywxYw)Nr�rzError setting I/O priority: %szInvalid process id!zInvalid thread id!zInvalid I/O priority data!zInvalid integer!)r)rr�rx�get_processr�r�taskstats_connection�
get_ioprior
�to_class_and_datar�r��
set_iopriorr�r�rr��errr`rbrdr^rV)rh�	exec_unit�tid�ioprio_valuer�r�rSr�s       �r$�ionicez"IOTopUI.handle_key.<locals>.ioniceas���� 
$��<�<�)�)��/�/�+�C� $� 1� 1� =� =�c� B�I��/�/�+�C� *�3�(,�(9�(9�(N�(N�!P�I�(�3�3�5��)/�)A�)A�,�)O�,��{�#�0�0��>���6�)�"#�K�"&�"2�"2�;�"?�K��$�$�\�;�?��!�!�'�'�)��!�!�3�3�5��!�!�#��"�
L��!�!�"B�Q�U�U�"J�K�K���
9��!�!�"7�8��
8��!�!�"6�7�$�
@��!�!�">�?��
6��!�!�"4�5��
$��!�!�#�
$�s6�D
D�	G�'E
�
G�)G�G�G�:G�Gr�c�,�tjd�S�Nr�r�r�r[r&r$r7z$IOTopUI.handle_key.<locals>.<lambda>���������r&r�c�,�tjd�Srrr[r&r$r7z$IOTopUI.handle_key.<locals>.<lambda>�rr&r�c�$���j�Sr5�r�r�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>������,�,�.�r&�Rc�$���j�Sr5rr�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>�rr&�a�A�o�Orjrr��Ic�&���jd�S)Nr��r�r�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>�s����/�/��3�r&c�&���jd�Sr�r$r�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>�s����/�/��2�r&c�V���jttj��Sr5�r�rMrfrzr�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>�s ����/�/��W�5I�5I�1J�0J�K�r&c�T���jttj��Sr5r'r�s�r$r7z$IOTopUI.handle_key.<locals>.<lambda>�s����/�/��G�4H�4H�0I�J�r&c��yr5r[r[r&r$r7z$IOTopUI.handle_key.<locals>.<lambda>�s�r&)r�rr�r��KEY_HOME�KEY_END�get)r�r�rrrr�key_bindings�actions`       r$r�zIOTopUI.handle_keyUsJ���	-�	&�	2�
!	$�F!
���H�#�!
�
��H�#�	!
�

��H�.�
!
�
��H�.�!
�
��H�"�!
�
��H�"�!
�
��H��!
�
��H��!!
�"
��H� �%!
�&
��H� �)!
�*
��H��-!
�.
��H��1!
�2
�O�O�3�5!
�6
���2�9!
�:
�O�O�K�=!
�>
�N�N�J�A!
��F�!�!�#�|�4���r&c�p�����fd�}�fd�}tt|�jjj	���}t
j�jd��jjrd��nd��|j��fd��j��tt||��S)Nc����t�
j|�
jj�}|\}}}}dtz}|j
f}|dz
}||j
�fz
}|dz
}||j�ddfz
}|dz
}|||fz
}�
jr
|dz
}|||fz
}n �
jjr
|dz
}|dz
}|d	z
}||z}|j�}	�
jjsN�
jt|�z
}
d
|
cxkrt|	�kr"nn|
dz
d
z}|
|z
dz
}|	d|dz|	|dz}	||	z
}�
jjs|d�
j}|S)
Nz%%%ddz %4sz %-8s�z
 %11s %11sz %7s %7sr�)z
?unavailable?r�rr�~)
rJr)rxr-�
MAX_PID_WIDTHrhrror�r|rur�rM)rjrErGrHr@rA�format�params�line�cmdline�remaining_length�len1�offset2r�s             �r$r4z IOTopUI.get_data.<locals>.format�s���� ����q�$�2C�2C�2L�2L�M�E�>C�;�H�l�J���}�,�F��U�U�V�F��f��F��a�l�l�n�o�%�F��g��F��a�j�j�l�2�A�&�'�'�F��l�"�F��j�+�-�-�F��!�!��*�$���,��0�0�����#�#��&� ���*�*���c�M�F��V�$�D��m�m�o�G��<�<�%�%�#'�:�:��D�	�#9� ��'�6�#�g�,�6�,�q�0�Q�6�D� 0�4� 7�!� ;�<�G�%�e�t�n�s�2�W�W�X�5F�F�G��G�O�D��<�<�%�%��K�T�Z�Z�(���Kr&c����jjxs%|j�jj�Sr5)r)r�did_some_ior9)rjr�s �r$�
should_formatz'IOTopUI.get_data.<locals>.should_format�s3����|�|�(�(�(�;��=�=����!9�!9�:�
;r&rc��|jSr5)r:�rjs r$r7z"IOTopUI.get_data.<locals>.<lambda>��
��Q�]�]�r&c��|jSr5)r=r?s r$r7z"IOTopUI.get_data.<locals>.<lambda>�r@r&c�"���|�|��Sr5r[)rjr��stats_lambdas ��r$r7z"IOTopUI.get_data.<locals>.<lambda>�s���S��L��O�%<�r&)r��reverse)
�list�filterrxr�valuesrfrzryr)r9�sortr{�map)r�r4r=rr�rCs`   @@r$�get_datazIOTopUI.get_data�s����	�>	;���
� $� 1� 1� ;� ;� B� B� D�F�G�	��"�"�4�#3�#3�4�Q�7���<�<�#�#�2�L�2�L����<�#�3�3�	�	5��C��	�*�+�+r&c���!�"�#�dt�j|d|�jd��dt�j|d|�jd���dt�j|d|�jd��dt�j|d|�jd���g}tdtdz
�d	z}�jj
r|d
z
}n|dz
}|dd
dddddg}tj�_�jrt�dk(rd�_�jd��j�}�jjr?dg|z}tjd�}	|D�
cgc]}
|	|
z��	}}
|D�cgc]}|	|z��	}}�jjr��jjdkrN|D]
}t!|���jjt#|�krt!dj%|��|D]
}
t!|
��t&j(j+�y�j,j/��jrd}nd}g}
g}�jj0�r��j3d�}�j3d�}t5ddddd�jj6rdnd fd!�jj
rd"nd#fd$�jj8rd%nd&fd'd(�j:rd)nd*fd+||j=�fd,||j=�fd-|dj=�fd.|dj=�fg
�}d}|j?�D]�\}}|r"d/|d0|g}d|d1k(rdnt@jBddg}n	d/|d2g}gd3�}|
r>|r<tEdj%|
|�dj%|�z��jFkDr(|
jI|�|jI|�|dz
}��|
|xx|z
cc<||xx|z
cc<��tE|��"t#tK|���#t#tK|��}tE|
�}�jL�"z
�#z
|z
|z
}|d4krg}d�#|d5krg}d�"|d6krd}d}|d7krg}
g}d}�jL�"z
�#z
|z
|z
}tOtE|�|�}tQ|�D]/\�!}�j,jS�!d|d�jF��1|rB�j,jU�"dtWd	�t@jXz�jF�d}�jF}t[tE|��D]��!�js�!d8vr�t@jX}|�!}�!�j\k(r|dd}�!�j\k(r*|t@j^z}|�j:xrd9xsd:z
}|d|}|tE|�z}|r�j,jS�"|||�|tE|�z
}��t[|�D]�!	�!�"�#�fd;�}	||�!��t[|�D]�}�jL|z
|z
|z} �j,jU| dtWd	�t@jXz�jF�d}t[tE|
|��D]Q�!�j,jg| ||
|�!t@jX||�!z�|tE|
|�!�z
}�S��|r9�j,jg�jLdz
d|t@j^��j,ji�ycc}
wcc}w#t`$r||�!jcd<��Y��\wxYw#t@jd$rY���wxYw)=NzTotal DISK READ:   r�z | Total DISK WRITE:   rzCurrent DISK READ: z | Current DISK WRITE: �r��PID�TIDz  PRIOz  USERz     DISK READz  DISK WRITEz  SWAPINz      IOz    COMMANDFz    TIMEz	%H:%M:%S rrzoCONFIG_TASK_DELAY_ACCT and kernel.task_delayacct sysctl not enabled in kernel, cannot determine SWAPIN and IO %r�)�keysr)�anyr�)r��quit)r�rr �all�activerj�threads�procsr�	bandwidth�accum)rHrr��asc�desc�left�right�home�endz  z: rQ�:)rrrrLrwr�r1r��>�<c�L���jj��z�zd|�yr)r}r�)r6r��len_summary�
len_titlesr�s ����r$�
print_linez+IOTopUI.refresh_display.<locals>.print_line]s ���������K��*�(D�a��Nr&zutf-8)5r.r)�rjustrCr3rr	�has_blkio_delay_totalr�r
r�rJr;�strftimer|�quietrRr�joinr��stdout�flushr}�erase�helpr�rrr9r{rP�itemsr�A_UNDERLINErMr��append�boolr�r1r�r�r�r�r��rangeryr��UnicodeEncodeError�encoder�r�r�)$r��
first_timer�r�r-�summaryrh�titles�lines�current_timer�rk�
status_msg�
help_lines�
help_attrs�prev�nextrn�	help_liner��	help_item�	help_attr�len_status_msg�len_help�	max_lines�	num_lines�pos�remaining_colsr��titlere�lnr6r�rcrds$`                                @@@r$r�zIOTopUI.refresh_display�s����!����u�Q�x��B�H�H��L� ����u�Q�x��B�H�H��L�N�!����w�q�z�8�D�J�J�2�N� ����w�q�z�8�D�J�J�2�N�P�	
���!�m�a�'�)�C�/���<�<�!�!��5�L�C��5�L�C��x��+;�^��j�-�9��"�8�8������
%�&�%�/�%*��"�����"��
�
����<�<��� �\�F�*�F��=�=��5�L�/4�5�!�\�A�%�5�E�5�18�9�A�|�a�'�9�G�9��<�<����|�|�!�!�Q�&� ��A��!�H���<�<�%�%��Z��8��"�'�'�&�/�*��
���a��
��J�J�����H�H�N�N���!�!�!�
�A�
�
�J��J��|�|� � ��+�+�B�/���+�+�A�.��"� �&�!�#��4�<�<�#4�#4�%�(�C��t�|�|�'=�'=�)�7�K�����)A�)A�+�w�O� ��4�#7�#7�%�V�D��V�D�\�/�/�1�2��f�T�l�0�0�2�3��V�A�Y�_�_�.�/��F�2�J�,�,�.�/�$����	�!%����
;�I�C���%)�3��d�$;�	�%&�S�E�\��v�?Q�?Q�ST�VW�$X�	�%)�3��$4�	�$-�	�%�T�S�����I�AV�9W�Z\�Za�Za�bk�Zl�9l�5m�pt�pz�pz�5z�"�)�)�)�4�"�)�)�)�4�!�Q��	�"�9�-��:�-�"�9�-��:�-�
;��g�,�K��T�&�\�*�J� ��j�!1�2�N��:��H����k�1�J�>��O�RZ�Z�I��1�}����
��1�}������1�}�!�
�!"���1�}��
��
������k�1�J�>��O�RZ�Z�I��C��J�	�2�I�!�'�*�
6���1�������1�a�����n�5�
6�������{�A�s�3�x�&�:J�:J�/J�D�J�J�W��C�!�Z�Z�N��3�v�;�'�
"���)�)�a�6�k���'�'���q�	����(�(�(�!�!�"�I�E���(�(�(��F�M�M�)�D��T�1�1�9�c�@�S�@�E��o�~�.���#�e�*�,����H�H�O�O�K��e�T�B��s�5�z�!��
"��9�%�
��
�O�=�"�5��8�,��
��H�o�
2���{�{�^�3�h�>��C�������t�Q��C��6�3C�3C�(C�T�Z�Z�P����s�:�b�>�2�3�2�A��H�H�O�O�D�#�z�"�~�a�/@�&�BR�BR�U_�`b�Uc�de�Uf�Bf�g��3�z�"�~�a�0�1�1�C�2�	
2����������a���J� &�
�
�/��H�H�����u6��9��R.�=�#�5��8�?�?�7�#;�<�=���|�|����s<�=^�^�_�^�#_�?_�_�_�_�_rr5)zError!)rXrYrZrzr�r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�rJr�r[r&r$rfrf�s���
�U�#�	)�5�1�	"�E�*�	"�D�)�	=�t�D�	*�D�1�
C�DH�	J�	%�u�-��L��"6�%�B8�M��
�����(�B���S�j-,�^Xr&rfc��|jr3tjtjtj�nKd�}tjtj|�tjtj
|�t
|�}t||�}t|||�}|j�y)Nc�.�tjd�yrr)r��kwargss  r$�
clean_exitz$run_iotop_window.<locals>.clean_exitxs
���H�H�Q�Kr&)
r|�signal�SIGPIPE�SIG_DFL�SIGINT�SIGTERMrrrfr�)r}r)r�rrx�uis      r$�run_iotop_windowr�tsw���}�}��
�
�f�n�n�f�n�n�5�	��
�
�f�m�m�Z�0��
�
�f�n�n�j�1�+�G�4���3�W�=�L�	��l�G�	,�B��F�F�Hr&c��	|jrtd|�Stjt|�S#tj$r;}td|tj��t
jd�Yd}~yd}~wt$r�}|jtjk(rKt|tj��tdtj��t
jd�|jtjk(r7t|tj��tdtj��n�Yd}~yd}~wwxYw)Nziotop interface error:)�filera�
The Linux kernel interfaces that iotop relies on now require root privileges
or the NET_ADMIN capability. This change occurred because a security issue
(CVE-2011-2494) was found that allows leakage of sensitive data across user
boundaries. If you require the ability to run iotop as a non-root user, please
configure sudo to allow you to run iotop as root.

Please do not file bugs on iotop about this.a/
The Linux kernel interfaces that iotop relies on for process I/O statistics
were not found. Please enable CONFIG_TASKSTATS in your Linux kernel build
configuration, use iotop outside a container and or share the host's
network namespace with the container.

Please do not file bugs on iotop about this.)
r|r�r�wrapperr�rRr��stderrr��OSErrorr��EPERM�ENOENT)r)rSs  r$�	run_iotopr��s�����=�=�#�D�'�2�2��>�>�"2�G�<�<���<�<��
�&���
�
�;�����������7�7�e�k�k�!��!�#�*�*�%��0�7:�j�j�
B�
�H�H�Q�K��7�7�e�l�l�"��!�#�*�*�%��0�7:�j�j�

B�
�
B���s&�4�4�E�1A=�=E�	B=E�Ec�.�d}	ddl}ddl}td�|jdt	�t�|�|j
|�}|j�|j!dd	�|j#d
�|j%d
�t'j(|�y#t$reddl}ddl	}|j|d��}td�|j|�|j�|jj|�}Y��wxYw)Nz
iotop.profrzProfiling using cProfilezcontinuation()r)�
lineeventszProfiling using hotshotr;�calls�2)�cProfile�pstatsrR�runctx�globals�localsr	�ImportError�hotshot�
hotshot.stats�Profile�runcall�closerE�load�
strip_dirs�
sort_stats�print_stats�
print_callees�os�remove)�continuation�	prof_filer�r�rEr��profs       r$�_profiler��s����I�
.���
�(�)����(�'�)�V�X�y�I����Y�'��
����	���V�W�%�	���b��	������I�I�i����.������y�Q��7��
�'�(����\�"��
�
���
�
�"�"�9�-��.�s�AB&�&A+D�DaF%s [OPTIONS]

DISK READ and DISK WRITE are the block I/O bandwidth used during the sampling
period. SWAPIN and IO are the percentages of time the thread spent respectively
while swapping in and waiting on I/O more generally. PRIO is the I/O priority
at which the thread is running (set using the ionice command).

Controls: left and right arrows to change the sorting column, r to invert the
sorting order, o to toggle the --only option, p to toggle the --processes
option, a to toggle the --accumulated option, i to change I/O priority, q to
quit, any other key to force a refresh.c	����	tjtjd�tjtdtz��}|jddddd	d
��|jdd
ddd��|jdddddd��|jddddddd��|jd d!dd"d#d$d%�&�|jd'd(d)d*d#d+d,�&�|jd-d.dd/d	d0��|jd1d2dd3d	d4��|jd5d6dd7d	d8��|jd9d:dd;d<��|jd=d>d?d@dAdB��|jdCddDd	t
j��|jdEdFdGdHdI��|j�\�}|r#|jdJdKj|�z�t���jxsg�_�j xs�j"xs�j$�_�fdL���j&r�fdM�}t)|�y��y#tj$rt	d�Y��*wxYw)NNrz8unable to set locale, falling back to the default localeziotop )�usage�versionz-oz--only�
store_truerFz1only show processes or threads actually doing I/O)r.�destr�rnz-bz--batchr|znon-interactive mode)r.r�rnz-nz--iterrr��NUMz-number of iterations before ending [infinite])�typer��metavarrnz-dz--delayrr�z#delay between iterations [1 second]�SECr)r�r�rnr�r�z-pz--pid�pidsrqz"processes/threads to monitor [all]rN)r�r�r.rnr�z-uz--user�str�userszusers to monitor [all]�USERz-Pz--processesrz$only show processes, not all threadsz-az
--accumulatedr9z)show accumulated I/O instead of bandwidthz-kz--kilobytesr(z.use kilobytes instead of a human friendly unitz-tz--timer;z.add a timestamp on each line (implies --batch)z-qz--quiet�countrirz/suppress some lines of header (implies --batch)z	--profile�profilez	--no-help�store_falsernTzsuppress listing of shortcutszUnexpected arguments: r�c���t��Sr5)r�)r)s�r$r7zmain.<locals>.<lambda>�s���	�'�*�r&c�4��	��y#t$rYywxYwr5)rQ)�	main_loops�r$�safe_main_loopzmain.<locals>.safe_main_loops���
�����
��
�s��	�)�locale�	setlocale�LC_ALL�ErrorrR�optparse�OptionParser�USAGEr�
add_option�
SUPPRESS_HELP�
parse_argsr�rjrr�r|r;rir�r�)�parserr�r�r�r)s   @@r$�mainr��s����J��������+��
"�
"���7�8J�
K�F�
���d�H�\�!�5�N��P����d�I�l��1��3�
���d�H�5�|�#�J��L����d�I�G�/�@�#�Q��0����d�G�%�f�X�?���P�
���d�H�5�w�%�,D�$��&����d�M�,�&��A��C����d�O�L�(�%�F��H����d�M�,�&��K��M����d�H�\��K��M�
���d�I�g�G�Q�L��N�
���k�,�Y�#�(�*@�*@��B�
���k�-�f�d�:��<��%�%�'�M�G�T�����-������>�?�
�g���<�<�%�2�G�L��M�M�B�W�\�\�B�W�]�]�G�M�*�I����	�
	�� ����m�<�<�J�
�H�I�J�s�$H1�1I�I)4�
__future__rrr�r�rr�r�r�r�r�r;�hasattrrr��RuntimeError�collectionsr�
iotop.datarrrr	r
r�
iotop.versionr�iotopr
�iotop.iopriorr r%r+r.rJrTr3rQrVr^r`rbrd�objectrfr�r�r��argvr�r�r[r&r$�<module>r�s��(&�
��
���	�
�
�
����4��%�'�"���$�]�]�!�!��'�	,��?��H�;�,�"�#�
�	�)�	�	��	�	��	�	��	�	�	�	�a�f�a�H
��L�4
	+�.1�X�X�a�[�
	9��9��M	�\�"���Y�Y�D�N��s�C-�-D�D

Youez - 2016 - github.com/yon3zu
LinuXploit