HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: //usr/lib/python3.9/site-packages/tuned/plugins/__pycache__/plugin_acpi.cpython-39.opt-1.pyc
a

,�g�	�@sXddlmZddlTddlZddlZddlZddlmZej	�
�ZGdd�dej�Z
dS)�)�base)�*�N)�ACPI_DIRcsveZdZdZ�fdd�Zedd��Zdd�Zdd	�Zed
d��Z	edd
��Z
ed�dd��Ze
d�ddd��Z�ZS)�
ACPIPlugina'
	Configures the ACPI driver.

	The only currently supported option is
	[option]`platform_profile`, which sets the ACPI
	platform profile sysfs attribute,
	a generic power/performance preference API for other drivers.
	Multiple profiles can be specified, separated by `|`.
	The first available profile is selected.

	.Selecting a platform profile
	====
	----
	[acpi]
	platform_profile=balanced|low-power
	----
	Using this option, *TuneD* will try to set the platform profile
	to `balanced`. If that fails, it will try to set it to `low-power`.
	====
	cstt|�j|i|��dS�N)�superr�__init__)�self�args�kwargs��	__class__��=/usr/lib/python3.9/site-packages/tuned/plugins/plugin_acpi.pyr	 szACPIPlugin.__init__cCsddiS�N�platform_profiler��clsrrr�_get_config_options#szACPIPlugin._get_config_optionscCsd|_d|_dS)NTF)Z_has_static_tuningZ_has_dynamic_tuning�r
�instancerrr�_instance_init'szACPIPlugin._instance_initcCsdSrrrrrr�_instance_cleanup+szACPIPlugin._instance_cleanupcCstj�td�S)NZplatform_profile_choices��os�path�joinrrrrr�_platform_profile_choices_path.sz)ACPIPlugin._platform_profile_choices_pathcCstj�td�Srrrrrr�_platform_profile_path2sz!ACPIPlugin._platform_profile_pathrcCs�tj�|���st�d�dSdd�|�d�D�}t|j�	|�
�����}|D]V}||vr�|s�t�d|�|jj|��||r�t
jgndd�|St�d|�qNt�d	�dS)
N�5ACPI platform_profile is not supported on this systemcSsg|]}|���qSr)�strip)�.0�profilerrr�
<listcomp>;�z4ACPIPlugin._set_platform_profile.<locals>.<listcomp>�|z Setting platform_profile to '%s'F)Zno_errorz+Requested platform_profile '%s' unavailablezDFailed to set platform_profile. Is the value in the profile correct?)rr�isfiler�log�debug�split�set�_cmd�	read_filer�infoZ
write_to_file�errno�ENOENTZwarning�error)r
ZprofilesrZsim�removeZavail_profilesr#rrr�_set_platform_profile6s 
�
z ACPIPlugin._set_platform_profileFcCs2tj�|���st�d�dS|j�|�����S)Nr )	rrr'rr(r)r,r-r!)r
rZignore_missingrrr�_get_platform_profileHs
z ACPIPlugin._get_platform_profile)F)�__name__�
__module__�__qualname__�__doc__r	�classmethodrrrrrZcommand_setr3Zcommand_getr4�
__classcell__rrr
rrs



r)�rZ
decoratorsrr/Z
tuned.logsZtunedZtuned.constsrZlogs�getr(ZPluginrrrrr�<module>s