ó ±2öYc@s`ddlZddlZddlZddlmZejjƒZdej fd„ƒYZ dS(iÿÿÿÿN(tcommandstcpulist_presentcBs eZdZd„Zd„ZRS(sY Checks whether CPUs from list are present, returns list containing only present CPUs cCs t|j|ƒjddƒdS(NRi(tsupert __class__t__init__(tself((sU/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_cpulist_present.pyR scCst|j|ƒj|ƒsdS|jjdj|ƒƒ}|jj|jjdƒƒ}djd„tt t |ƒj t |ƒƒƒƒDƒƒS(Ns,,s/sys/devices/system/cpu/presentt,css|]}t|ƒVqdS(N(tstr(t.0tv((sU/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_cpulist_present.pys s( RRtexecutetNonet_cmdtcpulist_unpacktjoint read_filetsortedtlisttsett intersection(Rtargstcpustpresent((sU/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_cpulist_present.pyR s (t__name__t __module__t__doc__RR (((sU/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_cpulist_present.pyRs ( tost tuned.logsttunedtbasettuned.utils.commandsRtlogstgettlogtFunctionR(((sU/usr/lib/python2.7/site-packages/tuned/profiles/functions/function_cpulist_present.pyts