????
Current Path : /proc/self/root/lib/python3.6/site-packages/glances/plugins/__pycache__/ |
Current File : //proc/self/root/lib/python3.6/site-packages/glances/plugins/__pycache__/glances_cpu.cpython-36.pyc |
3 Eo�c�= � @ sD d Z ddlmZ ddlmZ ddlmZ ddlmZm Z m Z ddlmZ ddlmZ ddlZd d d�dd d�d d d�dd d�dd d�dd d�dd d�dd d�dd d�dddddd�dddddd�dddddd�dddddd�d dd�d!d"d�d#�Zd$d%d&d'�d d(id d(id)d*d+d,�d-�Zd.d/d0d1�d2d3d0d1�gZG d4d5� d5e�ZdS )6zCPU plugin.� )�getTimeSinceLastUpdate)�iterkeys)�cpu_percent)�LINUX�WINDOWS�SUNOS)�Plugin)� GlancesPluginNz)Sum of all CPU percentages (except idle).�percent)�description�unitzrpercent time spent in kernel space. System CPU time is the time spent running code in the Operating System kernel.z�CPU percent time spent in user space. User CPU time is the time spent on the processor running your program's code (or code in libraries).zP*(Linux)*: percent time spent by the CPU waiting for I/O operations to complete.zA*(Windows)*: time spent servicing deferred procedure calls (DPCs)z�percent of CPU used by any program. Every program or task that runs on a computer system occupies a certain amount of processing time on the CPU. If the CPU has completed all tasks it is idle.z�*(Linux and BSD)*: percent time spent servicing/handling hardware/software interrupts. Time servicing interrupts (hardware + software).z�*(Unix)*: percent time occupied by user level processes with a positive nice value. The time the CPU has spent running users' processes that have been *niced*.z}*(Linux)*: percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor.z�number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer's CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict.ZnumberT�KZctx_sw)r r ZrateZ min_symbolZ short_namez number of interrupts per second.ZinterzOnumber of software interrupts per second. Always set to 0 on Windows and SunOS.Zsw_intz8number of system calls per second. Always 0 on Linux OS.Zsys_callzTotal number of CPU core.z$Number of seconds since last update.Zseconds)�total�system�user�iowait�dpc�idle�irq�nice�steal�ctx_switches� interrupts�soft_interrupts�syscalls�cpucore�time_since_updatez1.3.6.1.4.1.2021.11.9.0z1.3.6.1.4.1.2021.11.10.0z1.3.6.1.4.1.2021.11.11.0)r r r z1.3.6.1.2.1.25.3.3.1.2z1.3.6.1.4.1.789.1.2.1.3.0z1.3.6.1.4.1.789.1.2.1.5.0z1.3.6.1.4.1.789.1.2.1.6.0)r r r )�default�windows�esxiZnetappr zUser CPU usage�%)�namer Zy_unitr zSystem CPU usagec s\ e Zd ZdZd� fdd� Zejejdd� ��Zdd� Z d d � Z � fdd�Zdd d�Z� Z S )r zxGlances CPU plugin. 'stats' is a dictionary that contains the system-wide CPU utilization as a percentage. Nc sX t t| �j||ttd� d| _yt| jd�j� d | _ W n t k rR d| _ Y nX dS )zInit the CPU plugin.)�args�config�items_history_list�fields_descriptionT)r"