ó æ ”\c@s>ddlZejjƒZdgZdefd„ƒYZdS(iÿÿÿÿNtMonitorcBsøeZdZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZ ed„ƒZ ed„ƒZ ed „ƒ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 |_t j 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!tvaluet new_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__t classmethodRRRRRRRRRR 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.pyts