Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/temp.cpython-36.pyc

3

�uGh��@s@ddlZddlZddlZGdd�dej�Zedkr<e�j�dS)�Nc@seZdZdZdd�ZdS)�Plugin�tempcGs�i}tjdkr|yddl}Wn
dSyJ|jdd�}|j�}x0|D](}|jdkrB|j||jjdd	�j	d	�<qBW|Sd
St
td�s�dSytj�}Wn
d
SxF|j
�D]:\}}	x0|	D](}
|
d}|
ddkr�|}|
d||<q�Wq�W|S)z�
        expirimental plugin used to collect temperature from system sensors
        plugin can be tested by running agent360 test temp
        �win32rNzwmi module not installed.zroot\OpenHardwareMonitor)�	namespaceZTemperature�/�-z:Could not fetch temperature data from OpenHardwareMonitor.�sensors_temperatureszplatform not supportedzcan't read any temperature��)�sys�platform�wmiZWMIZSensorZ
SensorType�ValueZParent�replace�strip�hasattr�psutilr�items)�selfZunused�datar
�wZtemperature_infosZsensorZtempsZdevicer�value�type�r�>/root/tmp/pip-build-gzoz1_uw/agent360/agent360/plugins/temp.py�run
s8




z
Plugin.runN)�__name__�
__module__�__qualname__rrrrrrsr�__main__)ZpluginsrrZ
BasePluginrr�executerrrr�<module>s
*

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists