????

Your IP : 3.144.40.238


Current Path : /lib/python3.6/site-packages/glances/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/glances/__pycache__/stats_client.cpython-36.opt-1.pyc

3

Eo�c�@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zThe stats server manager.�N)�GlancesStats)�sys_path)�loggercs2eZdZdZd	�fdd�	Zdd�Zdd�Z�ZS)
�GlancesStatsClientz:This class stores, updates and gives stats for the client.Ncs$tt|�j||d�||_||_dS)z"Init the GlancesStatsClient class.)�config�argsN)�superr�__init__rr)�selfrr)�	__class__��"/usr/lib/python3.6/stats_client.pyr	szGlancesStatsClient.__init__cCsvd}xf|D]^}yt||�}Wn$tk
rBtjdj|��Yq
Xtjdj|��|j|jd�|j|<q
Wt	t
_dS)z4Set the plugin list according to the Glances server.Zglances_zLCan not import {} plugin. Please upgrade your Glances client/server version.zServer uses {} plugin)rN)�
__import__�ImportErrorr�error�format�debugZPluginr�_pluginsr�sys�path)r
Z
input_plugins�header�itemZpluginrrr
�set_plugins!s
zGlancesStatsClient.set_pluginscCs4x.|D]&}|j|j||�|j|j�qWdS)zUpdate all the stats.N)rZ	set_statsZupdate_views)r
Zinput_stats�prrr
�update7s
zGlancesStatsClient.update)NN)�__name__�
__module__�__qualname__�__doc__r	rr�
__classcell__rr)rr
rs
r)	rrZ
glances.statsrZglances.globalsrZglances.loggerrrrrrr
�<module>
s