KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/tuned/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyo
�
��\c@s�ddlmZddlTddlZddlZddlZddlZddlm	Z	ej
j�Ze	�Z
dejfd��YZdS(i(tbase(t*i����N(tcommandstVMPlugincBs�eZdZed��Zd�Zd�Zed��Zed�d��Z	ed�d��Z
ed�d	��Zed�d
��Z
ed�d��Zed�d
��ZRS(s(
	Plugin for tuning memory management.
	cCsidd6dd6dd6S(Nttransparent_hugepagesttransparent_hugepagestransparent_hugepage.defrag(tNone(tself((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_config_optionsscCst|_t|_dS(N(tTruet_has_static_tuningtFalset_has_dynamic_tuning(Rtinstance((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_instance_inits	cCsdS(N((RR
((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_instance_cleanupscCs%d}tjj|�s!d}n|S(Ns#/sys/kernel/mm/transparent_hugepages*/sys/kernel/mm/redhat_transparent_hugepage(tostpathtexists(RR((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt	_thp_path!s	RcCs�|dkr0|s,tjdt|��ndStjddt�}|jd�dkrt|sptjd	�ndSt	j
j|j�d
�}t	j
j
|�r�|s�tj||�n|S|s�tjd�ndSdS(
Ntalwaystnevertmadvises-Incorrect 'transparent_hugepages' value '%s'.s
/proc/cmdlinetno_errorstransparent_hugepage=isWtransparent_hugepage is already set in kernel boot cmdline, ingoring value from profiletenabledsDOption 'transparent_hugepages' is not supported on current hardware.(salwaysRR(tlogtwarntstrRtcmdt	read_fileR	tfindtinfoRRtjoinRRt
write_to_file(Rtvaluetsimtcmdlinetsys_file((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_set_transparent_hugepages)s"RcCs|j||�dS(N(R&(RR"R#((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_set_transparent_hugepageAscCsKtjj|j�d�}tjj|�rCtjtj|��SdSdS(NR(	RRR RRRtget_active_optionRR(RR%((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_transparent_hugepagesEscCs
|j�S(N(R)(R((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_transparent_hugepageNsstransparent_hugepage.defragcCshtjj|j�d�}tjj|�rJ|sFtj||�n|S|s`tjd�ndSdS(NtdefragsJOption 'transparent_hugepage.defrag' is not supported on current hardware.(
RRR RRRR!RRR(RR"R#R%((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt _set_transparent_hugepage_defragRscCsKtjj|j�d�}tjj|�rCtjtj|��SdSdS(NR+(	RRR RRRR(RR(RR%((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt _get_transparent_hugepage_defrag^s(t__name__t
__module__t__doc__tclassmethodRRRRtcommand_setR&R'tcommand_getR)R*R,R-(((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyR
s			(tRt
decoratorst
tuned.logsttunedRtstructtglobttuned.utils.commandsRtlogstgetRRtPluginR(((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt<module>s
	

Anon7 - 2021