![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /proc/self/root/usr/lib/python3.6/site-packages/tuned/plugins/__pycache__/ |
3 �<�e�W � @ sl d dl Z d dljZd dlZd dlZd dlZd dlmZ d dl Z d dl mZmZ ej j� ZG dd� de�ZdS )� N)�commands)�Popen�PIPEc @ s& 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� Zejfd2d3�Z d4d5� Z!d6d7� Z"d8d9� Z#ejfd:d;�Z$d<d=� Z%d>d?� Z&ejfd@dA�Z'dBdC� Z(dDdE� Z)dFdG� Z*dHdI� Z+dJdK� Z,dLdM� Z-d|dOdP�Z.d}dQdR�Z/d~dSdT�Z0ddUdV�Z1dWdX� Z2dYdZ� Z3d[d\� Z4d]d^� Z5d_d`� Z6d�dbdc�Z7d�ddde�Z8dfdg� Z9dhdi� Z:djdk� Z;d�dldm�Z<d�dndo�Z=dpdq� Z>drds� Z?dtdu� Z@d�dvdw�ZAd�dxdy�ZBdzd{� ZCdNS )��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 |j | jj�| _|| _|| _|| _|| _|| _t j � | _| j� || _ || _d| _d| _| j� | _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_cfg� variables� r �/usr/lib/python3.6/base.py�__init__ s zPlugin.__init__c C s | j � d S )N)�destroy_instances)r r r r �cleanup, s zPlugin.cleanupc C s | j s| j� d| _ d S )NT)r � _init_devices)r r r r �init_devices/ s zPlugin.init_devicesc C s | j jjd�d jdd�d S )N�.� �_���)r � __module__�split)r 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<