File: //lib/python3.6/site-packages/glances/__pycache__/standalone.cpython-36.opt-1.pyc
3
9��c� � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ ddlmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ G dd� de�ZdS )z&Manage the Glances standalone session.� N)�WINDOWS)�logger)�GlancesStdoutJson)�glances_processes)�GlancesStats)�GlancesCursesStandalone)�
GlancesStdout)�GlancesStdoutCsv)�GlancesStdoutIssue)�GlancesStdoutApiDoc)�Outdated)�Counterc @ sX e Zd ZdZddd�Zedd� �Zdd� Zd d
� Zdd� Z d
d� Z
ddd�Zdd� ZdS )�GlancesStandalonez>This class creates and manages the Glances standalone session.Nc C s� || _ || _|j| _|j| _t� }|j� t||d�| _ t
jdj|j
� �� |jrd| j� tjd� |js~t
jd� tj� nt
jd� tj� |jd k r�|jt_t r�|jr�tj� |j� | j j� t
jdj|j
� �� | jr�t
jd� dt_n�|j�rt
jd� t||d�| _n�|j �r8t
jd � t!||d�| _n�|j"�rbt
jd
j|j"�� t#||d�| _nh|j$�r�t
jdj|j$�� t%||d�| _n>|j&�r�t
jdj|j&�� t'||d�| _nd
t_t(||d�| _d S )N)�config�argsz+Plugins initialisation duration: {} secondsr z+Extended stats for top process are disabledz*Extended stats for top process are enabledz'First stats update duration: {} secondsz+Quiet mode is ON, nothing will be displayedzIssue mode is ONzFields descriptions mode is ONz8Stdout mode is ON, following stats will be displayed: {}z=Stdout JSON mode is ON, following stats will be displayed: {}z<Stdout CSV mode is ON, following stats will be displayed: {}�2 ))r r �quiet�_quiet�time�refresh_timer
�resetr �statsr �debug�format�getZmodules_list�display_modules_list�sys�exitZenable_process_extendedr Zdisable_extendedZenable_extendedZprocess_filterr Zno_kernel_threadsZdisable_kernel_threads�update�infoZ
max_processesZstdout_issuer
�screenZ
stdout_apidocr �stdoutr Zstdout_jsonr Z
stdout_csvr r )�selfr r Zstart_duration� r# � /usr/lib/python3.6/standalone.py�__init__"