관리-도구
편집 파일: application.cpython-39.opt-1.pyc
a ,�g� � @ s� d dl mZmZmZmZmZmZmZ d dlm Z d dl Z d dlZ ddlm Z ddlmZ d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZ e j�� 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� Zdd � Zdd� Z e jfdd�Zdd� Z dd� Ze jfdd�Zedd� �Zedd� �Zdd� ZdS )r Nc C s| t �dtjjt�� d f � d | _d | _t � � }t �|�}|d u rJt� n|| _ | j �tj�rjt �d� n t �d� t�� }| j �dtj�}tj|d�}t�� }t�� } tj�� } tj�� | _t�||||| | | j | j�}t| j �tj tj!��}t"�#||||| j �} t�� }t�$� }t�%| j �&tj'tj(��}t�)|||| j | j�}t*�+| ||| j | �| _,t-�.| j,| j �| _/| �0� d | _1d S )NzTuneD: %s, kernel: %s� z8dynamic tuning is enabled (can be overridden in plugins)z#dynamic tuning is globally disabled�udev_buffer_size)Zbuffer_size)2�log�info�tuned�versionZTUNED_VERSION_STR�os�uname�_dbus_exporter�_unix_socket_exporterr ZPickleProviderZFactoryr �config�get_bool�constsZCFG_DYNAMIC_TUNINGr Z RepositoryZget_sizeZCFG_DEF_UDEV_BUFFER_SIZEr Z InventoryZ DeviceMatcherZDeviceMatcherUdevr �instancer Z variablesZ Variables�int�getZCFG_DEFAULT_INSTANCE_PRIORITYZ!CFG_DEF_DEFAULT_INSTANCE_PRIORITYr ZManagerZMergerZLocator�get_listZCFG_PROFILE_DIRSZCFG_DEF_PROFILE_DIRS�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&