ó æ ”\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) cCsjt|_tƒ|_tƒ|_tƒ|_i|_|jƒt|_t j ddj |jƒƒdS(Nsavailable devices: %ss, ( tFalset_class_initializedtsett _instancest_available_devicest_updating_devicest_loadt_init_available_devicestTruetlogtdebugtjoin(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 R R(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(R tinstance((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_register_instance3scCs|jj|ƒdS(N(Rtremove(R R((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt_deregister_instance7scCsKtƒ}x|jD]}||jO}qW|jjƒ|jj|ƒdS(N(RRtdevicesRtclearR(R t 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 instancesCscCs^t|dƒs|jƒn|j|ƒ|dk rA||_n|jƒ|_|jƒdS(NR(thasattrRRtNoneRRR(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(Rtvaluet new_devices((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyRes cCs@|jƒ||jkr<|jj|ƒ|jj|ƒndS(N(RRR#RR(Rtdevice((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt add_deviceks cCs6||jkr2|jj|ƒ|jj|ƒndS(N(R#RR(RR&((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyt remove_devicerscCs?tgt|jjƒƒD]}|d|jkr|^qƒS(Ni(tdicttlistRtitemsR#(Rtdev_load((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytget_loadxscCs|jj|dƒS(N(RtgetR(RR&((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pytget_device_load{sN(t__name__t __module__t__doc__t classmethodRRRRRRRRRRR R"R!tpropertyRtsetterR'R(R-R/(((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyRs&        (t tuned.logsttunedtlogsR.R t__all__tobjectR(((s7/usr/lib/python2.7/site-packages/tuned/monitors/base.pyts