HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/local/lib/python3.9/site-packages/agent360/plugins/__pycache__/cpu.cpython-39.pyc
a

q�dg��@s@ddlZddlZddlZGdd�dej�Zedkr<e���dS)�Nc@seZdZdZdd�ZdS)�Plugin�cpucGs�|��}i}t��|d<i}t��}z|dWnpty�tjdd�}d}t��|d<|D]2}|d}i||<|jD]}	t||	�|||	<qxq^t�d�Yn0tjdd�}d}|D]�}|d}i||<i||<|jD]�}	t||	�|||	<zt��|d}
WnYq�Yn0|
dk�r q�t||	�|||	}|dk�rDd}||
d|||	<|||	dk�rvd|||	<|||	dkr�d|||	<q�q�|�	|�|S)	N�tsT)Zpercpu����g�?r�d)
Zget_agent_cache�time�psutilZ	cpu_stats�KeyErrorZ	cpu_times�_fields�getattr�sleepZset_agent_cache)�selfZunusedZ
prev_cacheZ
next_cache�resultsZ
data_stats�data�
cpu_numberr�keyZ
time_deltaZcpu_time_delta�r�>/usr/local/lib/python3.9/site-packages/agent360/plugins/cpu.py�run
sR





z
Plugin.runN)�__name__�
__module__�__qualname__rrrrrrsr�__main__)r	ZpluginsrZ
BasePluginrr�executerrrr�<module>s
3