| Current Path : /lib/fm-agent/plugins/__pycache__/ |
| Current File : //lib/fm-agent/plugins/__pycache__/process.cpython-36.pyc |
3 q��i�D � @ sT d dl Z d dlZd dlZyd dlZW n dZY nX d dlZG dd� dej�ZdS )� Nc @ s0 e Zd ZdZdZedd� �Zdd� Zdd� Zd S ) � ProcessPlugin�process�Processc C s� t j}d }dtjkr t j}d }nrdtjkr6t j}d }n\dtjkrLt j}d }nFtd krl| jjd� t j}d}n&tj j d�s�| jjd� t j}d}i S dtjkr�d d ||d dd�d d ||d dd�dd ||ddd�dd ||ddd�d�}n�dd ||d d�d d ||d dd�dd ||ddd�dd ||ddd�dd ||ddd�dd ||ddd�d d ||d dd�dd ||ddd�dd ||ddd�dd ||ddd�dd ||ddd�dd ||ddd�d�}|S )N�aix�darwin�vmwarez=Unable to import psutil library, no process metrics availablezDUnable to import psutil library, please install and rebuild metadataz/procz/proc not foundzEnable procfs.zNumber of processes - name� processesT)�label�options�status� error_message�unit� option_stringz'Number of processes - full command linezProcess is running�booleanz&Process is running - full command line)zprocess.named_countzprocess.named_count.fullzprocess.existszprocess.exists.fullzNumber of processes running)r r r r r z%Memory percentage of processes - name�percentz"CPU percentage of processes - namez+Process Thread Count - executable name only�threadsz2Memory percentage of processes - full command linez2MB of memory used by processes - full command line�MBz/CPU percentage of processes - full command linez/Process Thread Count - executable name and args)zprocess.running_countzprocess.named_countzprocess.named_memory_percentagezprocess.named_cpu_percentagezprocess.existszprocess.thread_countzprocess.named_count.fullz$process.named_memory_percentage.fullz process.named_memory_raw_mb.fullz!process.named_cpu_percentage.fullzprocess.exists.fullzprocess.thread_count.full)� agent_util� SUPPORTED�sys�platform�psutil�log�info�UNSUPPORTED�os�path�exists)�self�configr �msg�metadata� r"