File: //usr/lib/python3.6/site-packages/tuned/daemon/__pycache__/application.cpython-36.pyc
3
]�b� � @ s� d dl mZmZmZmZmZmZmZ d dlm Z d dl
Z d dlZ ddlm
Z
ddlmZ d dlZd dlZd dlZd dlZd dlZd dljZd dlmZ e jj� ZdgZG d d� de�ZdS )
� )�storage�units�monitors�plugins�profiles�exports�hardware)�TunedExceptionN� )�
controller)�daemon)�GlobalConfig�Applicationc @ s� e Zd Zddd�Zdd� Zdd� Zdd � Zd
d� Zej fdd
�Z
dd� Zdd� Zej fdd�Z
edd� �Zedd� �Zdd� ZdS )r Nc C sj t jdtjjtj� d f � d | _tj � }tj
|�}|d krDt� n|| _| jj
tj�rdt jd� n
t jd� tj� }| jjdtj�}tj|d�}tj� }tj� } tjj
� }
tjj� | _tj||||| |
| j| j�}t| jjtjtj ��}t!j"||||| j�}
tj
� }tj#� }tj$tj%�}tj&|||| j| j�}t'j(|
||| j| �| _)t*j+| j)| j�| _,| j-� d | _.d S )NzTuneD: %s, kernel: %s� z8dynamic tuning is enabled (can be overridden in plugins)z#dynamic tuning is globally disabled�udev_buffer_size)�buffer_size)/�log�info�tuned�versionZTUNED_VERSION_STR�os�uname�_dbus_exporterr ZPickleProviderZFactoryr
�config�get_bool�constsZCFG_DYNAMIC_TUNINGr Z
RepositoryZget_sizeZCFG_DEF_UDEV_BUFFER_SIZEr Z InventoryZ
DeviceMatcherZDeviceMatcherUdevr �instancer � variables� Variables�int�getZCFG_DEFAULT_INSTANCE_PRIORITYZ!CFG_DEF_DEFAULT_INSTANCE_PRIORITYr ZManagerZMergerZLocatorZLOAD_DIRECTORIES�Loaderr ZDaemon�_daemonr Z
Controller�_controller�
_init_signals� _pid_file)�selfZprofile_namer Zstorage_providerZstorage_factoryZmonitors_repositoryr Zhardware_inventoryZdevice_matcherZdevice_matcher_udevZplugin_instance_factoryZplugins_repositoryZdef_instance_priorityZunit_managerZprofile_factoryZprofile_mergerZprofile_locatorZprofile_loader� r'