Edit File: function_cpulist_online.cpython-36.opt-1.pyc
3 �<�e� � @ sH d dl Z d dlZddlmZ d dlmZ ejj� Z G dd� dej �ZdS )� N� )�base)�commandsc s, e Zd ZdZ� fdd�Z� fdd�Z� ZS )�cpulist_onlinezW Checks whether CPUs from list are online, returns list containing only online CPUs c s t t| �jdd� d S )Nr r )�superr �__init__)�self)� __class__� �-/usr/lib/python3.6/function_cpulist_online.pyr s zcpulist_online.__init__c sR t t| �j|�sd S | jjdj|��}| jj| jjd��� dj� fdd�|D ��S )N�,z/sys/devices/system/cpu/onlinec 3 s | ]}|� krt |�V qd S )N)�str)�.0�v)�onliner r � <genexpr> s z)cpulist_online.execute.<locals>.<genexpr>)r r �executeZ_cmdZcpulist_unpack�joinZ read_file)r �argsZcpus)r )r r r s zcpulist_online.execute)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r )r r r s r )�osZ tuned.logsZtuned� r Ztuned.utils.commandsr Zlogs�get�logZFunctionr r r r r �<module> s
Back to File Manager