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_scsi_host.pyc
�
��\c@s�ddlZddlmZddlTddlZddljZddlm	Z	ddl
Z
ddlZejj
�Zdejfd��YZdS(i����Ni(thotplug(t*(tcommandstSCSIHostPlugincBs�eZdZd�Zd�Zd�Zed��Zd�Zd�Z	d�Z
d�Zd	�Zed
��Z
d�Zd�Zd
�Zedde�d��Zed�ed��ZRS(s,
	Plugin for tuning options of SCSI hosts.
	cOs)tt|�j||�t�|_dS(N(tsuperRt__init__Rt_cmd(tselftargstkwargs((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyRscCsztt|�j�t|_t�|_x?|jjd�D]+}|j	|�r;|jj
|j�q;q;Wt�|_dS(Ntscsi(
RRt
_init_devicestTruet_devices_supportedtsett
_free_devicest_hardware_inventorytget_devicest_device_is_supportedtaddtsys_namet_assigned_devices(Rtdevice((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyRs	cCs&g|D]}|jjd|�^qS(NR
(Rt
get_device(Rtdevicestx((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_get_device_objects scCs
|jdkS(Nt	scsi_host(tdevice_type(tclsR((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyR#scCs|jj|d|j�dS(NR
(Rt	subscribet_hardware_events_callback(R((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_hardware_events_init'scCs|jj|�dS(N(Rtunsubscribe(R((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_hardware_events_cleanup*scCs/|j|�r+tt|�j||�ndS(N(RRRR(RteventR((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyR-scCstt|�j||�dS(N(RRt_added_device_apply_tuning(Rtinstancetdevice_name((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyR$1scCstt|�j||�dS(N(RRt_removed_device_unapply_tuning(RR%R&((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyR'4scCsidd6S(Ntalpm(tNone(R((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_get_config_options7scCst|_t|_dS(N(Rt_has_static_tuningtFalset_has_dynamic_tuning(RR%((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_instance_init=s	cCsdS(N((RR%((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_instance_cleanupAscCstjjdt|�d�S(Ns/sys/class/scsi_host/tlink_power_management_policy(tostpathtjointstr(RR((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt_get_alpm_policy_fileDsR(t
per_devicecCsu|dkrdS|j|�}|sqtjj|�rM|jj||�qqtjd|t	|�f�dSn|S(NsBALPM control file ('%s') not found, skipping ALPM setting for '%s'(
R)R5R1R2texistsRt
write_to_filetlogtinfoR4(RtpolicyRtsimtpolicy_file((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt	_set_alpmGscCsA|j|�}|jj|dt�j�}|dkr=|SdS(Ntno_errort(R5Rt	read_fileRtstripR)(RRtignore_missingR=R;((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt	_get_alpmTs(t__name__t
__module__t__doc__RRRtclassmethodRR R"RR$R'R*R.R/R5tcommand_setRR>tcommand_getR,RD(((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyRs"		
									
	(terrnoR@Rt
decoratorst
tuned.logsttunedttuned.conststconststtuned.utils.commandsRR1tretlogstgetR9tPluginR(((sB/usr/lib/python2.7/site-packages/tuned/plugins/plugin_scsi_host.pyt<module>s


Anon7 - 2021