404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.118.142.101: ~ $
3

�<�e�
�@srddlmZddlZddlZddlZddlTddlZddl	j
Z
ddlTddlm
Z
ejj�ZGdd�dej�ZdS)�)�base�N)�*)�commandscsfeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Ze	j
fdd
�Zdd�Zdd�Z
dd�Z�ZS)�SysfsPlugina|
	`sysfs`::
	
	Sets various `sysfs` settings specified by the plug-in options.
	+
	The syntax is `_name_=_value_`, where
	`_name_` is the `sysfs` path to use and `_value_` is
	the value to write. The `sysfs` path supports the shell-style
	wildcard characters (see `man 7 glob` for additional detail).
	+
	Use this plugin in case you need to change some settings that are
	not covered by other plug-ins. Prefer specific plug-ins if they
	cover the required settings.
	+
	.Ignore corrected errors and associated scans that cause latency spikes
	====
	----
	[sysfs]
	/sys/devices/system/machinecheck/machinecheck*/ignore_ce=1
	----
	====
	cs$tt|�j||�d|_t�|_dS)NT)�superr�__init__Z_has_dynamic_optionsr�_cmd)�self�args�kwargs)�	__class__��"/usr/lib/python3.6/plugin_sysfs.pyr'szSysfsPlugin.__init__cCs4d|_d|_tdd�t|jj��D��|_i|_dS)NFTcSs$g|]}tjj|d�|df�qS)rr)�os�path�normpath)�.0�	key_valuerrr�
<listcomp>0sz.SysfsPlugin._instance_init.<locals>.<listcomp>)Z_has_dynamic_tuningZ_has_static_tuning�dict�listZoptions�items�_sysfs�_sysfs_original)r
�instancerrr�_instance_init,szSysfsPlugin._instance_initcCsdS)Nr)r
rrrr�_instance_cleanup3szSysfsPlugin._instance_cleanupcCsvxpt|jj��D]^\}}|jj|�}xHtj|�D]:}|j|�r\|j|�|j	|<|j
||�q0tjd|�q0WqWdS)Nz)rejecting write to '%s' (not inside /sys))
rrr�
_variables�expand�glob�iglob�_check_sysfs�_read_sysfsr�_write_sysfs�log�error)r
r�key�value�v�frrr�_instance_apply_static6s
z"SysfsPlugin._instance_apply_staticc
Cspd}xft|jj��D]T\}}|jj|�}x>tj|�D]0}|j|�r4|j|�}	|j	|||	|�dkr4d}q4WqW|S)NTF)
rrrrrr r!r"r#Z
_verify_value)
r
rZignore_missingZdevices�retr'r(r)r*Zcurr_valrrr�_instance_verify_static@s

z#SysfsPlugin._instance_verify_staticcCs,x&t|jj��D]\}}|j||�qWdS)N)rrrr$)r
rZrollbackr'r(rrr�_instance_unapply_staticKsz$SysfsPlugin._instance_unapply_staticcCstjd|�S)Nz^/sys/.*)�re�match)r
�
sysfs_filerrrr"OszSysfsPlugin._check_sysfscCs2|jj|�j�}t|�dkr*|jj|d�SdSdS)NrF)r	Z	read_file�strip�lenZget_active_option)r
r1�datarrrr#RszSysfsPlugin._read_sysfscCs|jj||�S)N)r	Z
write_to_file)r
r1r(rrrr$YszSysfsPlugin._write_sysfs)�__name__�
__module__�__qualname__�__doc__rrrr+r-�constsZ
ROLLBACK_SOFTr.r"r#r$�
__classcell__rr)r
rr
s
r)�rr r/Zos.pathrZ
decoratorsZ
tuned.logsZtunedZtuned.constsr9�
subprocessZtuned.utils.commandsrZlogs�getr%ZPluginrrrrr�<module>s



Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 173 B 0644
__init__.cpython-36.pyc File 173 B 0644
base.cpython-36.opt-1.pyc File 21.13 KB 0644
base.cpython-36.pyc File 21.13 KB 0644
decorators.cpython-36.opt-1.pyc File 1.06 KB 0644
decorators.cpython-36.pyc File 1.06 KB 0644
exceptions.cpython-36.opt-1.pyc File 354 B 0644
exceptions.cpython-36.pyc File 354 B 0644
hotplug.cpython-36.opt-1.pyc File 4.23 KB 0644
hotplug.cpython-36.pyc File 4.23 KB 0644
plugin_acpi.cpython-36.opt-1.pyc File 3.35 KB 0644
plugin_acpi.cpython-36.pyc File 3.35 KB 0644
plugin_audio.cpython-36.opt-1.pyc File 4.03 KB 0644
plugin_audio.cpython-36.pyc File 4.03 KB 0644
plugin_bootloader.cpython-36.opt-1.pyc File 24.45 KB 0644
plugin_bootloader.cpython-36.pyc File 24.45 KB 0644
plugin_cpu.cpython-36.opt-1.pyc File 26.03 KB 0644
plugin_cpu.cpython-36.pyc File 26.06 KB 0644
plugin_disk.cpython-36.opt-1.pyc File 16.35 KB 0644
plugin_disk.cpython-36.pyc File 16.35 KB 0644
plugin_eeepc_she.cpython-36.opt-1.pyc File 3.43 KB 0644
plugin_eeepc_she.cpython-36.pyc File 3.43 KB 0644
plugin_irqbalance.cpython-36.opt-1.pyc File 4.51 KB 0644
plugin_irqbalance.cpython-36.pyc File 4.51 KB 0644
plugin_modules.cpython-36.opt-1.pyc File 5.45 KB 0644
plugin_modules.cpython-36.pyc File 5.45 KB 0644
plugin_mounts.cpython-36.opt-1.pyc File 5.5 KB 0644
plugin_mounts.cpython-36.pyc File 5.5 KB 0644
plugin_net.cpython-36.opt-1.pyc File 23.21 KB 0644
plugin_net.cpython-36.pyc File 23.21 KB 0644
plugin_rtentsk.cpython-36.opt-1.pyc File 1.34 KB 0644
plugin_rtentsk.cpython-36.pyc File 1.34 KB 0644
plugin_scheduler.cpython-36.opt-1.pyc File 53.44 KB 0644
plugin_scheduler.cpython-36.pyc File 53.44 KB 0644
plugin_script.cpython-36.opt-1.pyc File 4.26 KB 0644
plugin_script.cpython-36.pyc File 4.31 KB 0644
plugin_scsi_host.cpython-36.opt-1.pyc File 4.56 KB 0644
plugin_scsi_host.cpython-36.pyc File 4.56 KB 0644
plugin_selinux.cpython-36.opt-1.pyc File 3 KB 0644
plugin_selinux.cpython-36.pyc File 3 KB 0644
plugin_service.cpython-36.opt-1.pyc File 13.84 KB 0644
plugin_service.cpython-36.pyc File 13.84 KB 0644
plugin_sysctl.cpython-36.opt-1.pyc File 6.7 KB 0644
plugin_sysctl.cpython-36.pyc File 6.7 KB 0644
plugin_sysfs.cpython-36.opt-1.pyc File 3.64 KB 0644
plugin_sysfs.cpython-36.pyc File 3.64 KB 0644
plugin_systemd.cpython-36.opt-1.pyc File 5.92 KB 0644
plugin_systemd.cpython-36.pyc File 5.92 KB 0644
plugin_uncore.cpython-36.opt-1.pyc File 4.75 KB 0644
plugin_uncore.cpython-36.pyc File 4.75 KB 0644
plugin_usb.cpython-36.opt-1.pyc File 2.95 KB 0644
plugin_usb.cpython-36.pyc File 2.95 KB 0644
plugin_video.cpython-36.opt-1.pyc File 4.13 KB 0644
plugin_video.cpython-36.pyc File 4.13 KB 0644
plugin_vm.cpython-36.opt-1.pyc File 4.11 KB 0644
plugin_vm.cpython-36.pyc File 4.11 KB 0644
repository.cpython-36.opt-1.pyc File 1.87 KB 0644
repository.cpython-36.pyc File 1.92 KB 0644