Файловый менеджер - Редактировать - /usr/lib/python3.9/site-packages/glances/amps/__pycache__/glances_systemd.cpython-39.pyc
Назад
a ���c � @ sP d Z ddlmZmZ ddlmZ ddlmZmZ ddl m Z G dd� de �ZdS ) a� Systemd AMP =========== Monitor the state of the systemd system and service (unit) manager. How to read the stats --------------------- active: Number of active units. This is usually a fairly basic way to tell if the unit has started successfully or not. loaded: Number of loaded units (unit's configuration has been parsed by systemd). failed: Number of units with an active failed status. Source reference: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units Configuration file example -------------------------- [amp_systemd] # Systemd enable=true regex=\/usr\/lib\/systemd\/systemd refresh=60 one_line=true systemctl_cmd=/usr/bin/systemctl --plain � )�check_output�CalledProcessError)�logger)� iteritems�to_ascii)� GlancesAmpc @ s, e Zd ZdZdZdZdZdZdZdd� Z d S ) �AmpzGlances' Systemd AMP.ZSystemdz1.0z*Get services list from systemctl (systemd)Z Nicolargozcontact@nicolargo.comc C s& t �d�| j| �d��� zt| �d��� �}W n< ttfyl } z t �d�| j|�� W Y d}~n�d}~0 0 i }t |��d�dd� D ]`}|�� }t |�dkr�tdd�D ]<}z||| d7 <