GRAYBYTE WORDPRESS FILE MANAGER5910

Server IP : 149.255.58.128 / Your IP : 216.73.216.238
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
Directory : /usr/lib/python3.9/site-packages/tuned/ppd/__pycache__/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib/python3.9/site-packages/tuned/ppd/__pycache__//controller.cpython-39.opt-1.pyc
a

�Գf<!�@s�ddlmZmZddlmZddlmZddlmZm	Z	m
Z
ddlmZddl
Z
ddlZddlZe��ZdZdZd	Zd
ZdZdZdZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�dejj�ZdS)�)�exports�logs)�commands)�PPD_CONFIG_FILE)�	PPDConfig�PPD_PERFORMANCE�PPD_POWER_SAVER)�StrEnumN�tunedz-/sys/devices/system/cpu/intel_pstate/no_turboz4/sys/bus/platform/devices/thinkpad_acpi/dytc_lapmode�unknownzorg.freedesktop.UPowerz/org/freedesktop/UPowerc@seZdZdZdZdZdS)�PerformanceDegraded�zlap-detectedzhigh-operating-temperatureN)�__name__�
__module__�__qualname__�NONE�LAP_DETECTED�HIGH_OPERATING_TEMPERATURE�rr�8/usr/lib/python3.9/site-packages/tuned/ppd/controller.pyrsrc@seZdZdd�Zdd�ZdS)�ProfileHoldcCs||_||_||_||_dS�N)�profile�reason�app_id�watch)�selfrrrrrrr�__init__szProfileHold.__init__cCs|j|j|jd�S)N)�ProfileZReasonZ
ApplicationId)rrr�rrrr�as_dict"s�zProfileHold.as_dictN)rrrrr rrrrrsrc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�ProfileHoldManagercCsi|_d|_||_dS�Nr)�_holds�_cookie_counter�_controller)rZ
controllerrrrr+szProfileHoldManager.__init__cs���fdd�}|S)Ncs(|dkr$t�d��f�����dS)Nr
z1Application '%s' disappeared, releasing hold '%s')�log�info�remove)�name�r�cookierrr�callback1sz.ProfileHoldManager._callback.<locals>.callbackr)rr+rr,rr*r�	_callback0szProfileHoldManager._callbackcCs tdd�|j��D��rtStS)Ncss|]}|jtkVqdSr)rr��.0�holdrrr�	<genexpr>9�z=ProfileHoldManager._effective_hold_profile.<locals>.<genexpr>)�anyr#�valuesrrrrrr�_effective_hold_profile8sz*ProfileHoldManager._effective_hold_profilecCs\||jvrdS|j�|�}|j��t�d|�t�d|���t�	d||j
|jf�dS)N�ProfileReleased�ActiveProfileHoldsz5Releasing hold '%s': profile '%s' by application '%s')r#�popr�cancelrZsend_signal�property_changed�
as_dbus_arrayr&r'rr)rr+r0rrr�_cancel=s

zProfileHoldManager._cancelcCstjdd�|j��D�dd�S)NcSsg|]}|���qSr)r r.rrr�
<listcomp>Gr2z4ProfileHoldManager.as_dbus_array.<locals>.<listcomp>�a{sv}�Z	signature)�dbus�Arrayr#r4rrrrr;Fsz ProfileHoldManager.as_dbus_arraycCst|j}|jd7_|jj�||�||��}t�d|||f�t||||�|j|<t	�
d|���|j�|�|S)N�z2Adding hold '%s': profile '%s' by application '%s'r7)
r$r%�busZwatch_name_ownerr-r&r'rr#rr:r;�switch_profile)rrrr�callerr+rrrr�addIszProfileHoldManager.addcCs
||jvSr)r#�rr+rrr�hasSszProfileHoldManager.hascCs:|�|�t|j�dkr"|��}n|jj}|j�|�dSr")r<�lenr#r5r%�base_profilerD)rr+Znew_profilerrrr(Vs


zProfileHoldManager.removecCs"t|j���D]}|�|�qdSr)�listr#�keysr<rGrrr�clear^szProfileHoldManager.clearN)rrrrr-r5r<r;rFrHr(rMrrrrr!*s	
r!cseZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Ze	d
d��Z
e	dd��Zdd�Zdd�Z
dd�Ze�dd�dd��Ze�dd�dd��Ze�d�dd��Ze�d �d!d"��Ze�d �d#d$��Ze�d%�d&d'��Ze�d(�d)d*��Ze�d+�d,d-��Ze�d.�d/d0��Z�ZS)1�
Controllercs8tt|���||_||_t�|_t��|_	|�
�dSr)�superrNr�_bus�_tuned_interfacer�_cmd�	threading�Event�
_terminate�
initialize)rrCZtuned_interface��	__class__rrrds
zController.__init__cCslt�|jtj�}t|�td��|_t�	d|jr2dnd�|jrN|j
j|jn|j
j
|j}|j�|�dS)NZ	OnBatteryzBattery status: zDC (battery)z
AC (charging))r@Z	Interface�proxyZPROPERTIES_IFACE�boolZGet�UPOWER_DBUS_INTERFACE�_on_batteryr&r'�_config�ppd_to_tuned_battery�
_base_profile�ppd_to_tunedrQrD)rZ	interfaceZchangedZinvalidatedZ
properties�
tuned_profilerrr�upower_changedls
"zController.upower_changedc
Cspz8t��}|�tt�|_|j�d|j�|�ddd�Wn2tjj	yj}zt
�|�WYd}~n
d}~00dS)NZPropertiesChanged)r@Z	SystemBusZ
get_object�UPOWER_DBUS_NAME�UPOWER_DBUS_PATHrYZconnect_to_signalrb�
exceptions�
DBusExceptionr&�debug)rrC�errorrrr�setup_battery_signalingssz"Controller.setup_battery_signalingcCs�tj}tj�t�r,|j�t���dkr,tj	}tj�t
�rR|j�t
���dkrRtj}||jkr|t
�d|�||_t�d|�dS)N�1zPerformance degraded: %sr)rr�os�path�exists�
NO_TURBO_PATHrRZ	read_file�stripr�
LAP_MODE_PATHr�_performance_degradedr&r'rr:)rZperformance_degradedrrr�_check_performance_degraded|s  
z&Controller._check_performance_degradedcCs`t|�|_tj|_tt�|_|��}|t	kr0|n|jj
|_|�|j�d|_
|jjr\|��dS)NF)r!�_profile_holdsrrrqrrr]�active_profile�UNKNOWN_PROFILEZdefault_profiler_rDr\Zbattery_detectionri)rrtrrrrV�s

zController.initializecCs.t��|j�|jd�s"|��qt��dS)NrB)r�startrR�waitrUrr�stoprrrr�run�s
zController.runcCs|jSr)rPrrrrrC�szController.buscCs|jSr)r_rrrrrJ�szController.base_profilecCs|j��dSr)rU�setrrrr�	terminate�szController.terminatecCsX|��|krdS|jr"|jj|n
|jj|}t�d|�|j�|�t	�
d|�dS)NzSwitching to profile '%s'�
ActiveProfile)rtr\r]r^r`r&r'rQrDrr:)rrrarrrrD�szController.switch_profilecCs|j��}|jj�|t�Sr)rQrtr]Ztuned_to_ppd�getru)rrarrrrt�s
zController.active_profileZsss�ucCs6|tkr$|tkr$tj�dttf��|j�||||�S)Nz'Only '%s' and '%s' profiles may be held)rrr@rerfrsrF)rrrrrErrr�HoldProfile�s

�zController.HoldProfiler
cCs,|j�|�stj�d|��|j�|�dS)NzNo active hold for cookie '%s')rsrHr@rerfr()rr+rErrr�ReleaseProfile�szController.ReleaseProfilecCsdSrrrGrrrr6�szController.ProfileReleasedr|cCsH||jjvrtj�d|��t�d|�||_|j�	�|�
|�dS)NzInvalid profile '%s'zSetting base profile to %s)r]r`r@rerfr&rgr_rsrMrD)rrrrr�set_active_profile�s
zController.set_active_profilecCs|��Sr)rtrrrr�get_active_profile�szController.get_active_profileZProfilescCs tjdd�|jj��D�dd�S)NcSsg|]}|td��qS))rZDriver)�DRIVER)r/rrrrr=�r2z+Controller.get_profiles.<locals>.<listcomp>r>r?)r@rAr]r`rLrrrr�get_profiles�s�zController.get_profilesZActionscCstjgdd�S)N�sr?)r@rArrrr�get_actions�szController.get_actionsrcCs|jSr)rqrrrr�get_performance_degraded�sz#Controller.get_performance_degradedr7cCs
|j��Sr)rsr;rrrr�get_active_profile_holds�sz#Controller.get_active_profile_holds)rrrrrbrirrrVry�propertyrCrJr{rDrtrZexportrr��signalr6Zproperty_setterr�Zproperty_getterr�r�r�r�r��
__classcell__rrrWrrNcs>	











rN) r
rrZtuned.utils.commandsrZtuned.constsrZtuned.ppd.configrrr�enumr	rSr@rkr}r&r�rnrprurcrdr[r�objectrr!Z
interfacesZExportableInterfacerNrrrr�<module>s&9

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
December 04 2024 22:44:57
0 / root
0755
config.cpython-39.opt-1.pyc
3.386 KB
December 02 2024 09:49:29
0 / root
0644
config.cpython-39.pyc
3.386 KB
December 02 2024 09:49:29
0 / root
0644
controller.cpython-39.opt-1.pyc
9.815 KB
December 02 2024 09:49:29
0 / root
0644
controller.cpython-39.pyc
9.815 KB
December 02 2024 09:49:29
0 / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF