ok

Mini Shell

Direktori : /lib/python2.7/site-packages/tuned/monitors/
Upload File :
Current File : //lib/python2.7/site-packages/tuned/monitors/base.pyc

�
��\c@s>ddlZejj�ZdgZdefd��YZdS(i����NtMonitorcBs�eZdZed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zdd
�Zd�Zd�Zed
��Zejd��Zd�Zd�Zd�Zd�ZRS(s�
	Base class for all monitors.

	Monitors provide data about the running system to Plugin objects, which use the data
	to tune system parameters.

	Following methods require reimplementation:
	  - _init_available_devices(cls)
	  - update(cls)
	cCs�t|_t�|_t�|_t�|_i|_|j�t|jt�sXt	�t
|_tjddj
|j��dS(Nsavailable devices: %ss, (tFalset_class_initializedtsett
_instancest_available_devicest_updating_devicest_loadt_init_available_devicest
isinstancetAssertionErrortTruetlogtdebugtjoin(tcls((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_init_classs		
	cCs
t��dS(N(tNotImplementedError(R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyR!scCs+|j�tjddj|j��dS(Ns available devices updated to: %ss, (RRR
RR(R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_update_available_devices%s
	cCs|jS(N(R(R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytget_available_devices+scCs
t��dS(N(R(R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytupdate/scCs|jj|�dS(N(Rtadd(Rtinstance((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_register_instance3scCs|jj|�dS(N(Rtremove(RR((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_deregister_instance7scCsKt�}x|jD]}||jO}qW|jj�|jj|�dS(N(RRtdevicesRtclearR(Rtnew_updatingR((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_refresh_updating_devices;s
	
cCs|jS(N(R(R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt	instancesCscCsst|d�s1|j�t|d�s1t�n|j|�|dk	rV||_n|j�|_|j�dS(NR(thasattrRR
RtNoneRRR(tselfR((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt__init__Is

cCsy|j�WnnXdS(N(tcleanup(R!((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt__del__WscCs|j|�|j�dS(N(RR(R!((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyR#]s
cCs|jS(N(t_devices(R!((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyRascCs*|jt|�@}||_|j�dS(N(RRR%R(R!tvaluetnew_devices((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyRes	cCsdt|t�s$t|t�s$t�|j�||jkr`|jj|�|jj|�ndS(N(	R	tstrtunicodeR
RRR%RR(R!tdevice((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt
add_deviceks
$
cCsZt|t�s$t|t�s$t�||jkrV|jj|�|jj|�ndS(N(R	R(R)R
R%RR(R!R*((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt
remove_devicers$cCs?tgt|jj��D]}|d|jkr|^q�S(Ni(tdicttlistRtitemsR%(R!tdev_load((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytget_loadxscCs|jj|d�S(N(RtgetR (R!R*((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytget_device_load{sN(t__name__t
__module__t__doc__tclassmethodRRRRRRRRRR R"R$R#tpropertyRtsetterR+R,R1R3(((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyRs&

					(t
tuned.logsttunedtlogsR2Rt__all__tobjectR(((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt<module>s	

Zerion Mini Shell 1.0