PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  \c@sddlZddlZddlZddlZddlmZddlmZddl j Z ddl m Z ddlm Z ddlmZddlZejjZdefdYZdS( iN(tTunedException(tInvalidProfileException(tcommands(texports(tProfileRecommendertDaemoncBseZddddZdZdZdZedZe dZ e dZ e dZ dZ d Zd Zd Zd Zd ZdZdZdZdZdZdZdZedZRS(cCs%tjdtj|_ttj|_ttj|_ tj |_ t |_ |dk r|jtjtj|_t|jtjtj|_t|jtjtj|_ |jtjtj |_ |jtjtj|_ n||_|jdkr!ttj|_n|j dkr<t|_ n!|j |jkr]|j|_ n|j |j|_tjd|j|j rtjdtjd|j|j|jfn||_||_|jt|_y|j |Wn$t!k r }tj"d|nXdS(Nsinitializing daemonis$using sleep interval of %d second(s)s8dynamic tuning is enabled (can be overridden by plugins)sFusing update interval of %d second(s) (%d times of the sleep interval)s:Cannot set initial profile. No tunings will be enabled: %s(#tlogtdebugtconststCFG_DEF_DAEMONt_daemontinttCFG_DEF_SLEEP_INTERVALt_sleep_intervaltCFG_DEF_UPDATE_INTERVALt_update_intervaltCFG_DEF_DYNAMIC_TUNINGt_dynamic_tuningtTruet_recommend_commandtNonetget_boolt CFG_DAEMONtgettCFG_SLEEP_INTERVALtCFG_UPDATE_INTERVALtCFG_DYNAMIC_TUNINGtCFG_RECOMMEND_COMMANDtCFG_DEF_RECOMMEND_COMMANDt _applicationtFalset _sleep_cyclestinfot _unit_managert_profile_loadert _init_threadsRt_cmdt _init_profileRterror(tselft unit_managertprofile_loadert profile_namestconfigt applicationte((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyt__init__s@     !!    '    cCsVd|_tj|_tj|_tj|_|jjtj|_dS(N( Rt_threadt threadingtEventt _terminatet_terminate_profile_switcht _not_usedtsett_profile_applied(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR#4s   cCs|jddS(sARead configuration files again and load profile according to themN(R%R(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytreload_profile_config>scCst}|dkrC|j\}}|dkr_tjdq_n|dkr_tjdnd|_d|_|j||dS(NsINo profile is preset, running in manual mode. No profile will be enabled.tsNo profile will be enabled.(RRt_get_startup_profileRR t_profilet_manualt set_profile(R'R*tmanual((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR%Bs     cCs=|jr*t|j|tdn|dksB|dkrWd|_||_n|j}xH|D]@}||jj j krjt|j|td|qjqjWy"|j j ||_||_Wn8t k r }t|j|td||fnX|r9|dkr&d}n|j||ndS(Ns/Cannot set profile while the daemon is running.R8s%Requested profile '%s' doesn't exist.sCannot load profile(s) '%s': %s(t is_runningRt_notify_profile_changedRRR:R;tsplitR)tprofile_locatortget_known_namesR"tloadRt_save_active_profile(R'R*R=tsave_instantlyt profile_listtprofileR-((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR<Ps(       )  cCs|jS(N(R:(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyRGiscCs|jS(N(R;(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR=mscCs|jS(N(R"(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR)qscCsG|jdk rC|jjdk rC|jjjtj|||n|S(N(RRt_dbus_exportert send_signalRtDBUS_SIGNAL_PROFILE_CHANGED(R'R*tresultterrstr((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR?ws!"cCs|jjddgddg\}}|dkr7tS|d dkrKtS|jjddgddg\}}tjd|dkS( Nt systemctlsis-system-runningt no_errorsiitstoppings list-jobss0\b(shutdown|reboot|halt|poweroff)\.target.*start(R$texecuteRtretsearchR(R'tretcodetout((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyt_full_rollback_required|s' 'cCs%|jdkrtdn|jj|jj|j|jj|j|jj |j j t j d|jj|jrtjn|j|jjtd|jrF|j}x|jj|j|jsB|jr|d8}|dkr?|j}t jd|jjt jd|jjq?qqWn|j jd}x6|jj|j|j r|dkr|d7}q\W|jjrt}nNt }|j!r|jrt j d t}qt j d n t j d |jr|jj"|n|jj#dS( Ns2Cannot start the daemon without setting a profile.s'static tuning from profile '%s' appliedtOKiisupdating monitorssperforming tuningsis+terminating Tuned, rolling back all changess"terminating Tuned in one-shot modes1terminating Tuned due to system shutdown / reboot($R:RRR!tcreatetunitsRDtnameR;t start_tuningR6R5RR R RtstartR?RRR$twaitR2R RRtupdate_monitorst update_tuningtclearR4R3tis_setRRUt stop_tuningt destroy_all(R't _sleep_cnttit full_rollback((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyt _thread_codesJ              +       cCsDy|jj||Wn&tk r?}tjt|nXdS(N(R$tsave_active_profileRRR&tstr(R'R*R=R-((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyRDscCs;tjdtjd|j }tjd||S(NsWRunning in automatic mode, checking what profile is recommended for your configuration.t hardcodedsUsing '%s' profile(RR Rt recommendR(R'RG((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyt_get_recommended_profiles cCsO|jj\}}|dkr0|dk }n|sE|j}n||fS(N(R$tget_active_profileRRk(R'RGR=((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR9s  cCs|jjjS(s$Return all accessible plugin classes(R!tplugins_repositorytload_all_plugins(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytget_all_pluginsscCs5y|jjj|}Wntk r-dSX|jS(sReturn plugin class docstringR8(R!Rmt load_plugint ImportErrort__doc__(R't plugin_namet plugin_class((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytget_plugin_documentations    cCs8y|jjj|}Wntk r-iSX|jS(sReturn plugin's parameters and their hints Parameters: plugin_name -- plugins name Return: dictionary -- {parameter_name: hint} (R!RmRpRqtget_config_options_hints(R'RsRt((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytget_plugin_hintss    cCs |jdk S(N(R:R(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyt is_enabledscCs|jdk o|jjS(N(R/Rtis_alive(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR>scCs|jrtS|jdkr#tStjd|jjtj d|j |_ |j j |jj |j jtS(Nsstarting tuningttarget(R>RR:RRR R4R5R0tThreadRfR/R3R_R2R[R(R'((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyR[s      cCs|jstjdtS|jdkr=tjdtS|jjs]tjdtS|jj tj d|jj |j j |}|jj|S(Nstuned is not runningsno profile is setsprofile is not appliedsverifying profile(s): %s(R>RR&RR:RR6R`R4R_R RYR!t verify_tuningR5(R'tignore_missingtret((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytverify_profiles      cCsZ|jstStjd|r3|jjn|jj|jjd|_t S(Nsstopping tuning( R>RRR R3R5R2R/tjoinRR(R'tprofile_switch((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pytstops     N(t__name__t __module__RR.R#R7R%RR<tpropertyRGR=R)R?RURfRDRkR9RoRuRwRxR>R[RR(((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyRs,#     ;         (tosterrnoR0t tuned.logsttunedttuned.exceptionsRttuned.profiles.exceptionsRt tuned.constsRttuned.utils.commandsRRttuned.utils.profile_recommenderRRQtlogsRRtobjectR(((s7/usr/lib/python2.7/site-packages/tuned/daemon/daemon.pyts