403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.6/site-packages/tuned/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/tuned/plugins/__pycache__/plugin_sysfs.cpython-36.pyc
3

��c^
�@shddlmZddlZddlZddlZddlTddlZddl	Tddl
mZejj
�ZGdd�dej�ZdS)�)�base�N)�*)�commandscsbeZdZdZ�fdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
d�Z	dd�Z
dd�Zdd�Z�Z
S)�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>/sz.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_cleanup2szSysfsPlugin._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_static5s
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_staticFcCs,x&t|jj��D]\}}|j||�qWdS)N)rrrr$)r
rZ
full_rollbackr'r(rrr�_instance_unapply_staticJsz$SysfsPlugin._instance_unapply_staticcCstjd|�S)Nz^/sys/.*)�re�match)r
�
sysfs_filerrrr"NszSysfsPlugin._check_sysfscCs2|jj|�j�}t|�dkr*|jj|d�SdSdS)NrF)r	Z	read_file�strip�lenZget_active_option)r
r1�datarrrr#QszSysfsPlugin._read_sysfscCs|jj||�S)N)r	Z
write_to_file)r
r1r(rrrr$XszSysfsPlugin._write_sysfs)F)�__name__�
__module__�__qualname__�__doc__rrrr+r-r.r"r#r$�
__classcell__rr)r
rrs

r)�rr r/Zos.pathrZ
decoratorsZ
tuned.logsZtuned�
subprocessZtuned.utils.commandsrZlogs�getr%ZPluginrrrrr�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit