/usr/share/cagefs-skeleton/lib/python3.9/site-packages/glances/plugins/__pycache__
a ���c;� � @ s� d Z ddlZddlZddlmZmZ ddlmZmZm Z m Z mZmZm Z ddlmZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZmZ ddlmZ dd iZddddddddddddd�ZG dd� de�Z dS )z2 I am your father... ...for all Glances plugins. � N)� json_dumps�json_dumps_dictlist)�iterkeys� itervalues�listkeys�map�mean� nativestr�PY3)�GlancesActions)�GlancesHistory)�logger)�glances_events)�glances_thresholds)�Counter�Timer)�unicode_message�percent�%�float�int)r �percents�numberZnumbersr Zintsr Zfloats�secondZsecondsZbyte�bytesc @ s� e Zd ZdZdddi dfdd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z d�dd�Zd�dd�Zdd� Z dd� Zdd� Zdd� Zdd� Zd�d d!�Zd�d"d#�Zd�d$d%�Zd�d&d'�Zd�d)d*�Zed+d,� �Zejd-d,� �Zed.d/� �Zd0d1� Zejd2d/� �Zd3d4� Zd�d6d7�Zd8d9� Zd:d;� Zd<d=� Z d>d?� Z!d@dA� Z"dBdC� Z#dDdE� Z$dFdG� Z%dHdI� Z&d�dJdK�Z'd�dLdM�Z(dNdO� Z)edPdQ� �Z*e*jdRdQ� �Z*dSdT� Z+dUdV� Z,dWdX� Z-dYdZ� Z.d�d[d\�Z/d]d^� Z0d�d`da�Z1d�ddde�Z2dfdg� Z3dhdi� Z4d�djdk�Z5d�dldm�Z6d�dndo�Z7d�dpdq�Z8d�drds�Z9d_dg fdtdu�Z:d�dvdw�Z;d�dxdy�Z<d�dzd{�Z=d|d}� Z>d�d~d�Z?d�d�d��Z@d�d�d��ZAd�d�� ZBd�d�d��ZCed�d�� �ZDeDjd�d�� �ZDd�d�d��ZEd�d�d��ZFd�d�� ZGd�d�� ZHeIeG�ZGeIeH�ZHdS )�� GlancesPluginzMain class for Glances plugin.Nc C s� | j j�d�td� d }| j j|d� | _|| _d| _d| _d| _|| _ | � � | _t� | _ |dur�t�d�| j|�� �� | j|d� t|d �| _t� | _d | _g | _td�| _|| _|| _d| _| �� dS )a Init the plugin of plugins class. All Glances' plugins should inherit from this class. Most of the methods are already implemented in the father classes. Your plugin should return a dict or a list of dicts (stored in the self.stats). As an example, you can have a look on the mem plugin (for dict) or network (for list of dicts). A plugin should implement: - the __init__ constructor: define the self.display_curse - the reset method: to set your self.stats variable to {} or [] - the update method: where your self.stats variable is set and optionally: - the get_key method: set the key of the dict (only for list of dict) - the update_view method: only if you need to trick your output - the msg_curse: define the curse (UI) message (if display_curse is True) :args: args parameters :items_history_list: list of items to store in the history :stats_init_value: Default value for a stats item �glances_Zglances� N�left�localzLoad section {} in {})�config)�argsFr )� __class__� __module__�find�len�plugin_namer! �_align� _input_method�_short_system_name�items_history_list�init_stats_history� stats_history�dict�_limitsr �debug�formatZconfig_file_paths�load_limitsr �actions�views� hide_zero�hide_zero_fieldsr � refresh_timer�fields_description�stats_init_value�stats�reset)�selfr! r r* r8 r7 �pos� r= �B/usr/lib/python3.9/site-packages/glances/plugins/glances_plugin.py�__init__3 s* zGlancesPlugin.__init__c C s | j S )zReturn the raw stats.�r9 �r; r= r= r>