AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/__pycache__/summary.cpython-311.pyc |
� �ug� � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZd dl Z d dlZd dlmZmZ d dlmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% d dl&Z'd dl(Z(d dl)Z)d dl*Z*d d l+m,Z, d dl-m.Z. d dl/m0Z0m1Z1m2Z2 d d l3m4Z4 d dl5m6Z6m7Z7 d dl8m9Z9 d dl:m;Z;m<Z<m=Z= d dl>m?Z? d dl@mAZA d dlBmCZC d dlDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZO d dlPmQZQmRZRmSZS d dlTmUZU d dlVmWZWmXZX d dlYmZZZm[Z[ d dl\m]Z] d dl^m_Z_ d dl`maZb d dlcmdZd d dlemfZfmgZg d dlhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZy d dlzm{Z{m|Z|m}Z} d d l~mZ d!d"l�m�Z� d!d#l�m�Z� d d$l�m�Z� d d%l�m�Z�m�Z�m�Z�m�Z�m�Z�m�Z� d d&l�m�Z� d d'l�m�Z� d dl�maZ� n# e�$ r ejZ�ejZ�ejZ�ejZ�ejZ�ejZ�ejZ�dZ�dZ�dZ�Y nw xY w d d(l�m�Z� n# e�$ r d)� Z�Y nw xY wd*Z� ej� d+� � Z�d,Z�d-Z�d.Z�d/Z�d0Z�d1Z�d2Z�d3Z�d4e�d5e�fd6�Z� G d7� d8� � Z�d9� Z�dS ):� N)�Counter�defaultdict)� lru_cache�partial)�groupby)� cpu_count)� attrgetter)�Path)�getfqdn)�Any�AnyStr�Callable�Dict�List�Optional�Tuple�Union)�get_hidepid_typing_from_mounts)�cpapi)� find_wp_paths�get_wp_cache_plugin� get_wp_paths_with_enabled_module)�Feature)�is_panel_feature_supported�is_wp2_environment)� MySQLGovernor)� CLEditions�is_cl_shared_edition�is_cl_solo_edition)�client_activation_data)�ACCELERATE_WP_INSTALLED_FROM_CM)� SysCtlConf)�ExternalProgramFailed�get_cl_version�get_rhn_systemid_value� get_virt_type�grep�is_litespeed_running�is_nginx_running�is_secureboot_enabled�is_testing_enabled_repo� is_ubuntu�run_command)�cagefs_statistics_config�clconfig_utils�db_governor_lib)�is_email_notification_enabled)�print_dictionary�replace_params)�DEFAULTS�LimitsDataStorage)�EMPTY_LIMITS)�ALL_MODULES)�PKG_VERSION)�LvpMap)�CONFIG_PATH�_read_config_file)� SummaryStatus�dummy_none_function�get_cl_plus_sender_status�get_client_data_from_jwt_token� get_packages_with_lve_extensions�$get_statistics_send_status_from_file�is_active_cloudlinux_license�is_nodejs_selector_installed�is_php_selector_installed�is_python_selector_installed�is_ruby_selector_installed�is_sending_process_running�is_statistic_enabled�is_statistic_rpm_enabled� set_statistic_collection_enabled�$set_statistic_rpm_collection_enabled�$write_statistics_send_status_to_file)�NotSupported�get_cpu_metrics�get_memory_metrics)�get_rpm_packages_info� )�parse_cloudlinux_summary_opts)�StatisticsDict)�get_default_version)�get_default_php_version�get_mode_of_php_selector�get_native_version_safe�get_php_selector_usage�get_versions_statistics�iter_server_applications)�CloudlinuxSelectorLib)�PKG_RELEASE��list_flags_infoc � � g S �N� ra � �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/clsummary/summary.pyr^ r^ � s � �� rb z/var/log/cloudlinux-summary.logzcloudlinux-summary�unknown� installed� not_installed�not_initialized�not_selected�enabled�disabledz-42� site_dict�returnc �n � t t d� | d � � � � � � � S )zB Checks if wordpress site has at least one enabled module c � � | d S )Nri ra )�modules rc �<lambda>z*site_has_enabled_modules.<locals>.<lambda>� s � �&��"3� rb �modules)�any�map�values)rk s rc �site_has_enabled_modulesru � s1 � � �s�3�3�Y�y�5I�5P�5P�5R�5R�S�S�T�T�Trb c �� � e Zd ZdZdZ ej g d� ej e j � � ej e j � � ej e j � � g� � Z dZdZdZd� Zed� � � Zed � � � Zed efd�� � Zed� � � Zed � � � Zed� � � Zd efd�Zed� � � Zd� Zd� Zed e fd�� � Z!ed� � � Z"eded efd�� � Z#d� Z$d� Z%ed� � � Z&d� Z'ed�d�� � Z(d� Z)ed� � � Z*ed� � � Z+ed e,e-e-f d e fd!�� � Z.d"� Z/d#� Z0ed$e1d%e2d dfd&�� � Z3d'e,e2e1f d(e2d)e d dfd*�Z4d+� Z5ed,� � � Z6d-� Z7d.� Z8ed efd/�� � Z9d�d0�Z:d�d1�Z;ed2� � � Z<ed3� � � Z=d4� Z>ed5� � � Z?d�d6�Z@d eAe1 fd7�ZBd eAe1 fd8�ZCed eAe1 fd9�� � ZDd�d:�ZEd;eFd dfd<�ZGd;eFd dfd=�ZHd;eFd dfd>�ZId�d?�ZJd�d@�ZKdA� ZLdB� ZMdC� ZNdD� ZOedEedFePfdG�� � ZQd eRePeS ePeS e,ee1f f fdH�ZTd eReUe eUe f fdI�ZVdJedKedLe,eef d e,eeWePef f fdM�ZXdNed efdO�ZYe eZd�P� � dQ� � � � � Z[d�dR�Z\d�dS�Z]edTe1dUe1d eAe1 fdV�� � Z^edTe1dWe1d eAe1 fdX�� � Z_edYe`d e1fdZ�� � ZaedYe`d e1fd[�� � ZbedYe`d e1fd\�� � ZcedYe`d edfd]�� � ZedYe`d e1fd^�ZfedYe`d e1fd_�� � ZgedYe`d e1fd`�� � ZhdYe`d efda�Ziedbedced e`e fdd�� � Zjeded e`fde�� � Zkd�df�Zled efdg�� � Zmd�dh�Znedi� � � Zodj� Zpedk� � � Zqedl� � � Zredm� � � Zsed e fdn�� � Zted e fdo�� � Zued e1fdp�� � Zved efdq�� � Zwedr� � � Zxds� Zydt� Zzdue2d eAe1 fdv�Z{dw� Z|dx� Z}dy� Z~dz� Zed e,fd{�� � Z�d|� Z�d}� Z�d eRe1e1e1f fd~�Z�ed eRe1ef fd�� � Z�d�� Z�d�� Z�d�d��Z�d�d��Z�d�d��Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�ed�� � � Z�d�� Z�d eAe1 fd��Z�d eAe1 fd��Z�e�d�� � � Z�ed�� � � Z�ed�� � � Z�d;eFd e`e�e1ef d�f fd��Z�d�e1d;eFd eAeRe1ef fd��Z�d�� Z�e d�d�ed�e�dz d�e1d�e dz d e�j� f d��� � Z�ed�d�ed�e1d eAd fd��� � Z�ed eAe, fd��� � Z�ed�� � � Z�ed�� � � Z�ed�� � � Z�ed�� � � Z�ed eAe, fd��� � Z�ed efd��� � Z�ed�ed e1fd��� � Z�ed eAe, fd��� � Z�d e,fd��Z�ed eAe, fd��� � Z�ed eAe, fd��� � Z�dS )��CloudlinuxSummaryz/var/lve/dashboard_certificatez/etc/cl_plus/.disabled)�python�ruby�nodejsz-https://stat-api.cloudlinux.com/api/clos-statz-https://stat-api.cloudlinux.com/api/rpm-statsz6https://repo.cloudlinux.com/static/cl-settings-v1.jsonc �� � i | _ d | _ t � � | _ d | _ d | _ | � � � | _ d | _ t � � | _ d S r` )�_opts�_security_tokenrS � statistics�_lvpmap� _system_id�_is_process_not_limited�is_process_not_limited�packages_by_lenr"