| Server IP : 185.143.233.130 / Your IP : 185.215.232.195 Web Server : LiteSpeed System : Linux jambul.7ho.st 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : renecafe ( 1327) PHP Version : 8.1.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.9/site-packages/tuned/plugins/__pycache__/ |
Upload File : |
a
,�g� � @ s@ d dl mZ ddlmZ ddlZej�� ZG dd� dej �Z dS )� )�base� Nc s� e Zd ZdZ� fdd�Z� fdd�Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Z� ZS ) �Pluginz:
Base class for plugins with device hotpluging support.
c s t t| �j|i |�� d S �N)�superr �__init__)�self�args�kwargs�� __class__� �9/usr/lib/python3.9/site-packages/tuned/plugins/hotplug.pyr s zPlugin.__init__c s t t| ��� | �� d S r )r r �cleanup�_hardware_events_cleanup�r r r
r r s zPlugin.cleanupc C s d S r r
r r
r
r �_hardware_events_init s zPlugin._hardware_events_initc C s d S r r
r r
r
r r s zPlugin._hardware_events_cleanupc C s | � � d S r )r r r
r
r �
_init_devices s zPlugin._init_devicesc C st |dkr&t �d|j � | �|j� nJ|dkrLt �d|j � | �|j� n$|dkrpt �d|j � | �|j� d S )N�addzdevice '%s', add event�removezdevice '%s', remove event�movez-device: '%s', rename event, reported new name)�log�infoZsys_name�_add_device�_remove_device�_move_device)r ZeventZdevicer
r
r �_hardware_events_callback s z Plugin._hardware_events_callbackc C sd t �d|j|f � | j�|� | �||jd|g� | �||� | �||jd|g� |j �|� d S )Nz!instance %s: adding new device %sZapply)
r r �name�_assigned_devicesr �_call_device_script�
script_pre�_added_device_apply_tuning�script_post�processed_devices�r �instance�device_namer
r
r �_add_device_process'