HEX
Server: LiteSpeed
System: Linux baran.dnsprotection.me 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: ddir12 (3618)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/glances/plugins/__pycache__/glances_help.cpython-36.opt-1.pyc
3

Eo�c� �@sTdZddlZddlmZddlmZmZddlmZddl	m
Z
Gdd�de�ZdS)	z@
Help plugin.

Just a stupid plugin to display the help screen.
�N)�	iteritems)�__version__�psutil_version)�
GlancesPlugin)�chaincsNeZdZdZd�fdd�	Zdd�Zdd�Zd	d
�Zddd�Zdd
d�Z	�Z
S)�PluginzGlances help plugin.NcsRtt|�j||d�||_d|_tjdkr@ddlm}|�|_	ni|_	|j
�dS)	zInit the plugin.)�args�configT��r)�OrderedDictN)r
r)�superr�__init__r	Z
display_curse�sys�version_info�collectionsr�	view_data�generate_view_data)�selfrr	r)�	__class__��"/usr/lib/python3.6/glances_help.pyrs

zPlugin.__init__cCsdS)z2No stats. It is just a plugin to display the help.Nr)rrrr�reset,szPlugin.resetcCsdS)z2No stats. It is just a plugin to display the help.Nr)rrrr�update/sz
Plugin.updatecBCsVdjdt�|jd<djt�|jd<ydj|jj�|jd<Wntk
rNYnXd}d	}|jjd
|jd�fd|jd
d�fd|jdd�fd|jdd�fd|jdd�fd|jdd�fd|jdd�fd|jdd �fd!|jd"�fd#|jd$d%�fd&|jd'd(�fd)|jd*d+�fd,|jd-d.�fd/|jd0d1�fd2|jd3d4�fd5|jd6d7�fd8|jd9d:�fd;|jd<d=�fd>|jd?d@�fdA|jdBdC�fdD|jdEdF�fdG|jdHdI�fdJ|jdKdL�fdM|jdNdO�fdP|jdQdR�fdS|jdTdU�fdV|jdWdX�fdY|jdZd[�fd\|jd]d^�fd_|jd`�fda|jdbdc�fdd|jdedf�fdg|jdhdi�fdj|jdkdl�fdm|jdndo�fdp|jdqdr�fds|jdtdu�fdv|jdwdx�fdy|jdzd{�fd||jd}d~�fd|jd��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�|jd�d��fd�g7�d�S)�zGenerate the views.z{} {}ZGlances�versionz with psutil {}rzConfiguration file: {}�configuration_filez  {0:1}  {1:34}z{0:39}�header_sortzSORT PROCESSES:Z	sort_auto�aZ
AutomaticallyZsort_cpu�czCPU%Zsort_io_rate�izI/O rateZsort_mem�mzMEM%Zsort_process_name�pzProcess nameZsort_cpu_times�tZTIMEZ	sort_user�uZUSERZheader_show_hidezSHOW/HIDE SECTION:Z show_hide_application_monitoring�AzApplication monitoringZshow_hide_diskio�dzDisk I/OZshow_hide_docker�DZDockerZshow_hide_top_extended_stats�ezTop extended statsZshow_hide_filesystem�fZ
FilesystemZ
show_hide_gpu�GZGPUZshow_hide_ip�IZIPZshow_hide_tcp_connection�KZTCPZshow_hide_alert�lz
Alert logsZshow_hide_network�nZNetworkZshow_hide_current_time�NZTimeZ
show_hide_irq�QZIRQZshow_hide_raid_plugin�RZRAIDZshow_hide_sensors�sZSensorsZshow_hide_wifi_module�WZWifiZshow_hide_processes�zZ	ProcessesZshow_hide_left_sidebar�2zLeft sidebarZshow_hide_quick_look�3z
Quick LookZshow_hide_cpu_mem_swap�4zCPU, MEM, and SWAPZ
show_hide_all�5ZALLZ
header_togglezTOGGLE DATA TYPE:Ztoggle_bits_bytes�bzNetwork I/O, bits/bytesZtoggle_count_rate�BzDisk I/O, count/rateZtoggle_used_free�FzFilesystem space, used/freeZtoggle_bar_sparkline�SzQuick Look, bar/sparklineZtoggle_separate_combined�TzNetwork I/O, separate/combinedZtoggle_live_cumulative�UzNetwork I/O, live/cumulativeZtoggle_linux_percentage�0zLoad, Linux/percentageZtoggle_cpu_individual_combined�1zCPU, individual/combinedZtoggle_gpu_individual_combined�6zGPU, individual/combinedZtoggle_short_full�/zProcess names, short/fullZheader_miscellaneouszMISCELLANEOUS:Zmisc_erase_process_filter�EzErase process filterZmisc_generate_history_graphs�gzGenerate history graphsZ	misc_help�hZHELPZ$misc_accumulate_processes_by_program�jzDisplay threads or programsZmisc_increase_nice_process�+zIncrease nice processZmisc_decrease_nice_process�-z)Decrease nice process (need admin rights)Zmisc_kill_process�kzKill processZ$misc_reset_processes_summary_min_max�MzReset processes summary min/maxZ	misc_quit�qzQUIT (or Esc or Ctrl-C)Zmisc_reset_history�rz
Reset historyZmisc_delete_warning_alerts�wzDelete warning alertsZ'misc_delete_warning_and_critical_alerts�xz Delete warning & critical alertsZmisc_theme_white�9z$Optimize colors for white background� misc_edit_process_filter_pattern�$  ENTER: Edit process filter patternN)rOrP)�formatrrrr	Zloaded_config_file�AttributeErrorr)rZmsg_colZ
msg_headerrrrr2s�zPlugin.generate_view_datacCs|jS)zReturn the view.)r)rrrrr�
get_view_dataszPlugin.get_view_datac	
s^g}|j�j�jdd��|j�j�jd��|j�j��d�jkrn|j�j�jd��|j�j��|j�j��g}d}x<t�j�D].\}}|r�n|dkr�d}nq�|j�j|��q�Wt|�dd	}|jd
d�tt|d|��t	||d�t�fd
d�d��t�jd��D��|j�j��|j�jd��|j�j��|j�jd��|S)z2Return the list to display in the curse interface.rZTITLErrFrT��css|]}|D]
}|Vq
qdS)Nr)�.0Ztriplet�msgrrr�	<genexpr>�sz#Plugin.msg_curse.<locals>.<genexpr>Ncs
�jd�S)N�)�curse_add_liner)rrr�<lambda>�sz"Plugin.msg_curse.<locals>.<lambda>z'For an exhaustive list of key bindings:zGhttps://glances.readthedocs.io/en/latest/cmds.html#interactive-commands)
�appendrZrZcurse_new_liner�len�extend�zip�iterr)	rrZ	max_width�retZ	shortcutsZ
collectingrH�vZnlinesr)rr�	msg_curse�s:
zPlugin.msg_curse)NN)N)NN)�__name__�
__module__�__qualname__�__doc__rrrrrSrc�
__classcell__rr)rrrsM
r)rgrZglances.compatrZglancesrrZglances.plugins.glances_pluginr�	itertoolsrrrrrr�<module>s