관리-도구
편집 파일: persistors.cpython-311.pyc
� �Cg6 � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m Z d dlmZm Z mZ d dlmZ dZ G d� de � � Z G d � d e � � Z G d� de � � ZdS ) � N)�ExternalProgramFailed�run_command)�LveStatsPlugin)�atomic_write_csv�atomic_write_str�deserialize_lve_id)�mempages_to_bytes�iseletskc �8 � e Zd Zdd�Zd� Zed� � � Zd� ZdS )� FileSaver� /var/lve/infoc �F � || _ t j d� � | _ dS )z:type fname: strzplugin.file_saverN��fname�logging� getLogger�log��selfr s ��/builddir/build/BUILDROOT/lve-stats-4.2.10-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/plugins/generic/persistors.py�__init__zFileSaver.__init__ s � ��� ��$�%8�9�9����� c � � t | j |� � dS # t $ r,}| j � d| j |� � Y d}~dS d}~ww xY w)z9 :type output: list :rtype: None �%Error during saving the "%s" file: %sN)r r �OSErrorr �error)r �output�es r �writezFileSaver.write sq � � S��T�Z��0�0�0�0�0��� S� S� S��H�N�N�B�D�J�PQ�R�R�R�R�R�R�R�R�R����� S���s � � A�!A � Ac � � | j |j k pR| j |j k pB| j |j k p2| j |j k p"| j |j k p| j dz |j k }|dk r| j |j k }nd}|p|S )z� :type lve_usage: lvestats.plugins.generic.aggregators.AggregatedLveUsage :type lve_stat: lvestat.LVEStat :type lve_version: int � � F)�lep�cpu�lcpu�lmem�lmemphy�lnproc�io�liops)�lve_stat� lve_usage�lve_version�res1�res2s r �compare_limitszFileSaver.compare_limits'