Server IP : 149.255.58.128 / Your IP : 216.73.216.25
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Upload Files :
Command :
Current File : /usr/lib/python3.9/site-packages/tuned/plugins/__pycache__//base.cpython-39.pyc
a
��Mg@Z � @ sn d dl Z d dlmZ d dlZd dlZd dlZd dlmZ d dl Z d dl
mZmZ ej
�� ZG dd� de�ZdS )� N)�commands)�Popen�PIPEc @ s6 e Zd ZdZdd� Zdd� Zdd� Zedd � �Ze d
d� �Z
e dd
� �Ze dd� �Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zej fd4d5�Z!d6d7� Z"d8d9� Z#d:d;� Z$ej fd<d=�Z%d>d?� Z&d@dA� Z'ej fdBdC�Z(dDdE� Z)dFdG� Z*dHdI� Z+dJdK� Z,dLdM� Z-dNdO� Z.dPdQ� Z/d�dSdT�Z0d�dUdV�Z1d�dWdX�Z2d�dYdZ�Z3d[d\� Z4d]d^� Z5d_d`� Z6dadb� Z7dcdd� Z8d�dfdg�Z9d�dhdi�Z:djdk� Z;dldm� Z<dndo� Z=d�dpdq�Z>d�drds�Z?dtdu� Z@dvdw� ZAdxdy� ZBd�dzd{�ZCd�d|d}�ZDd~d� ZEdRS )��Plugina
Base class for all plugins.
Plugins change various system settings in order to get desired performance or power
saving. Plugins use Monitor objects to get information from the running system.
Intentionally a lot of logic is included in the plugin to increase plugin flexibility.
c C sn |� | jj�| _|| _|| _|| _|| _|| _t �
� | _| �� || _
|| _d| _d| _| �� | _t� | _dS )zPlugin constructor.FN)�create� __class__�__name__�_storageZ_monitors_repositoryZ_hardware_inventory�_device_matcher�_device_matcher_udev�_instance_factory�collections�OrderedDict�
_instances�_init_commands�_global_cfg�
_variables�_has_dynamic_options�_devices_inited�#_get_config_options_used_by_dynamic�_options_used_by_dynamicr �_cmd) �selfZmonitors_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZinstance_factoryZ
global_cfgZ variables� r �6/usr/lib/python3.9/site-packages/tuned/plugins/base.py�__init__ s
zPlugin.__init__c C s | � � d S �N)�destroy_instances�r r r r �cleanup, s zPlugin.cleanupc C s | j s| �� d| _ d S )NT)r �
_init_devicesr r r r �init_devices/ s zPlugin.init_devicesc C s | j j�d�d �dd�d S )N�.����_� )r �
__module__�splitr r r r �name4 s zPlugin.namec C s i S )z-Default configuration options for the plugin.r r r r r �_get_config_options<