?HgddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlmZmZddlmZmZddlmZddlmZddlmZddlmZddlmZdd lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%ddl&Z'ddl(Z(ddl)Z)ddl*Z*dd l+m,Z,dd l-m.Z.dd l/m0Z0m1Z1m2Z2dd l3m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;mm?Z?ddl@mAZAddlBmCZCddlDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOddlPmQZQmRZRmSZSddlTmUZUddlVmWZWmXZXddlYmZZZm[Z[ddl\m]Z]ddl^m_Z_ddl`maZbddlcmdZdddlemfZfmgZgddlhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZyddlzm{Z{m|Z|m}Z}dd l~mZd!d"lmZd!d#lmZ dd$lmZdd%lmZmZmZmZmZmZdd&lmZdd'lmZddlmaZn#e$rejZejZejZejZejZejZejZdZdZdZYnwxYw dd(lmZn#e$rd)ZYnwxYwd*Zejd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4ed5efd6ZGd7d8Zd9ZdS):N)Counter defaultdict) lru_cachepartial)groupby) cpu_count) attrgetter)Path)getfqdn)AnyAnyStrCallableDictListOptionalTupleUnion)get_hidepid_typing_from_mounts)cpapi) find_wp_pathsget_wp_cache_plugin get_wp_paths_with_enabled_module)Feature)is_panel_feature_supportedis_wp2_environment) MySQLGovernor) CLEditionsis_cl_shared_editionis_cl_solo_edition)client_activation_data)ACCELERATE_WP_INSTALLED_FROM_CM) SysCtlConf) ExternalProgramFailedget_cl_versionget_rhn_systemid_value get_virt_typegrepis_litespeed_runningis_nginx_runningis_secureboot_enabledis_testing_enabled_repo is_ubuntu run_command)cagefs_statistics_configclconfig_utilsdb_governor_lib)is_email_notification_enabled)print_dictionaryreplace_params)DEFAULTSLimitsDataStorage) EMPTY_LIMITS) ALL_MODULES) PKG_VERSION)LvpMap) CONFIG_PATH_read_config_file) SummaryStatusdummy_none_functionget_cl_plus_sender_statusget_client_data_from_jwt_token get_packages_with_lve_extensions$get_statistics_send_status_from_fileis_active_cloudlinux_licenseis_nodejs_selector_installedis_php_selector_installedis_python_selector_installedis_ruby_selector_installedis_sending_process_runningis_statistic_enabledis_statistic_rpm_enabled set_statistic_collection_enabled$set_statistic_rpm_collection_enabled$write_statistics_send_status_to_file) NotSupportedget_cpu_metricsget_memory_metrics)get_rpm_packages_info)parse_cloudlinux_summary_opts)StatisticsDict)get_default_version)get_default_php_versionget_mode_of_php_selectorget_native_version_safeget_php_selector_usageget_versions_statisticsiter_server_applications)CloudlinuxSelectorLib) PKG_RELEASElist_flags_infocgSNraF/opt/cloudlinux/venv/lib/python3.11/site-packages/clsummary/summary.pyr^r^s rbz/var/log/cloudlinux-summary.logzcloudlinux-summaryunknown installed not_installednot_initialized not_selectedenableddisabledz-42 site_dictreturncnttd|dS)zB Checks if wordpress site has at least one enabled module c|dS)Nrira)modules rcz*site_has_enabled_modules..s &"3rbmodules)anymapvalues)rks rcsite_has_enabled_modulesrus1 s33Yy5I5P5P5R5RSS T TTrbc eZdZdZdZejgdeje j eje j eje j gZ dZdZdZdZedZed Zed efd Zed Zed ZedZd efdZedZdZdZed e fdZ!edZ"eded efdZ#dZ$dZ%edZ&dZ'eddZ(dZ)edZ*edZ+ed e,e-e-fd e fd!Z.d"Z/d#Z0ed$e1d%e2d dfd&Z3d'e,e2e1fd(e2d)e d dfd*Z4d+Z5ed,Z6d-Z7d.Z8ed efd/Z9dd0Z:dd1Z;ed2Zed5Z?dd6Z@d eAe1fd7ZBd eAe1fd8ZCed eAe1fd9ZDdd:ZEd;eFd dfd<ZGd;eFd dfd=ZHd;eFd dfd>ZIdd?ZJdd@ZKdAZLdBZMdCZNdDZOedEedFePfdGZQd eRePeSePeSe,ee1fffdHZTd eReUeeUeffdIZVdJedKedLe,eefd e,eeWePefffdMZXdNed efdOZYeeZdPdQZ[ddRZ\ddSZ]edTe1dUe1d eAe1fdVZ^edTe1dWe1d eAe1fdXZ_edYe`d e1fdZZaedYe`d e1fd[ZbedYe`d e1fd\ZcedYe`d edfd]ZedYe`d e1fd^ZfedYe`d e1fd_ZgedYe`d e1fd`ZhdYe`d efdaZiedbedced e`efddZjeded e`fdeZkddfZled efdgZmddhZnediZodjZpedkZqedlZredmZsed e fdnZted e fdoZued e1fdpZved efdqZwedrZxdsZydtZzdue2d eAe1fdvZ{dwZ|dxZ}dyZ~dzZed e,fd{Zd|Zd}Zd eRe1e1e1ffd~Zed eRe1effdZdZdZddZddZddZdZdZdZdZdZedZdZd eAe1fdZd eAe1fdZedZedZedZd;eFd e`ee1efdffdZde1d;eFd eAeRe1effdZdZe ddededzde1de dzd ejf dZeddede1d eAdfdZed eAe,fdZedZedZedZedZed eAe,fdZed efdZeded e1fdZed eAe,fdZd e,fdZed eAe,fdZed eAe,fdZdS)CloudlinuxSummaryz/var/lve/dashboard_certificatez/etc/cl_plus/.disabled)pythonrubynodejsz-https://stat-api.cloudlinux.com/api/clos-statz-https://stat-api.cloudlinux.com/api/rpm-statsz6https://repo.cloudlinux.com/static/cl-settings-v1.jsonci|_d|_t|_d|_d|_||_d|_t|_ dSr`) _opts_security_tokenrS statistics_lvpmap _system_id_is_process_not_limitedis_process_not_limitedpackages_by_lenr"sysctlselfs rc__init__zCloudlinuxSummary.__init__sW #*8*:*: &*&B&B&D&D## ll rbcttjd}ttjd}| o| S)zm Return true if process is running outside LVE or it's not running by utility `nice` RUNNING_BY_NICERUNNING_IN_LVE)boolosenvironget)is_running_by_niceis_running_in_lves rcrz)CloudlinuxSummary._is_process_not_limitedsP ""*..1B"C"CDD 0@!A!ABB%%?.?*??rbcD|jt|_|jS)z. Load lvpmap only when needed )r _get_lvpmaprs rclvpmapzCloudlinuxSummary.lvpmaps < &==DL|rbrlcF|jtd|_|jS)N system_id)rr%rs rcrzCloudlinuxSummary.system_ids# ? "4[AADOrbc&trdndS)Nubuntu rhel_like)r,rarbrc _get_platformzCloudlinuxSummary._get_platforms$;;7xxK7rbc:trtntSr`)r*ENABLEDDISABLEDrarbrc_detect_securebootz$CloudlinuxSummary._detect_secureboots/11?wwx?rbctjtjzdfdt dD}|S)Nc3@K|]}tjVdSr`)randomchoice).0_range_for_random_choices rc z=CloudlinuxSummary._generate_security_token..s. [ [A/F!G!G [ [ [ [ [ [rb@)string ascii_lettersdigitsjoinrange)security_tokenrs @rc_generate_security_tokenz*CloudlinuxSummary._generate_security_tokensI"("6"F [ [ [ [QVWYQZQZ [ [ [[[rbci}|j3d}t||d|id|j}t||j|jd}d} tj|j|d}n\#tj $rJ}t|}t||d|iYd}~nd}~wwxYw|j sCd|j d|j }t||d|itd  |d}t|dt r-|d|td n#t&t(f$r6d }t||d|iYndt*$rX}td t||j|dd t.diYd}~nd}~wwxYw|S)NzSecurity token is emptyresultzGetting statistics from server )rr<)paramstimeoutServer answer is: HTTP code ; Reason: z!Received response from the serverz,SUCCESS: received statistics from the serverz Can't parse api response to jsonz=Invalid json response from server, field %s not found in "%s"z"Invalid response from server. See z for details.)r app_loggererror_error_and_exit SUMMARY_URLinforrequestsrRequestExceptionstrok status_codereasonjson isinstancedictupdate_get_smart_advice_statistics TypeError ValueErrorKeyErrortextLOG_FILE)r stat_datamessagerresponsees rc_get_remote_dataz"CloudlinuxSummary._get_remote_datas   &/G   W % % %  (G!4 5 5 5FD4DFF   "1   6|D$4VRPPPHH( 6 6 6!ffG   W % % %  (G!4 5 5 5 5 5 5 5 5 6 { 6fX5IffU]UdffG OOG $ $ $  (G!4 5 5 5;<<< L 1I)H-t44 P(#**4+L+L+N+NOOO OOJ K K K K:& 6 6 68G   W % % %  (G!4 5 5 5 5 5 n n n   \^abc^d^dfnfs t t t  (,kT\,k,k,k!l m m m m m m m m n s:3BC)AC$$C)A"GAI5 I5AI00I5c |j|jStj|jr||_n2|}||r|nd|_|jSr`)r}rpathisfileDASHBOARD_CERTIFICATE_read_token_from_filer_write_token_to_file)rtokens rcrz CloudlinuxSummary.security_tokens   +' ' 7>>$4 5 5 W#'#=#=#?#?D 1133E,0,E,Ee,L,L#V55RVD ##rbcR t|jdd5}||dddn #1swxYwYtj|jddS#t t f$r3}tdt|Yd}~dSd}~wwxYw) z Write security token to file and return success/fail status :param token: generated security token :return: T/F status wutf-8encodingNiTz,Error while writing secure token to file: %sF) openrwriterchmodIOErrorOSErrorrrr)rrfrs rcrz&CloudlinuxSummary._write_token_to_file!s  d0#HHH A                HT/ 7 7 74!      KSQRVV T T T55555 s4A"; A"?A"?A""B&3(B!!B&cD t|jdd5}|pdcdddS#1swxYwYdS#tt f$r3}t dt|Yd}~dSd}~wwxYw)Nrrrz.Error while reading file with secure token: %s) rrreadstriprrrrr)rrrs rcrz'CloudlinuxSummary._read_token_from_file0s d0#HHH 0Avvxx~~''/4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0!      MsSTvv V V V44444 s:A(A AAAAAB,(BBcFtjtjdddS)z Detect old LVE limits integration presence according to https://docs.cloudlinux.com/index.html?lve_limits_with_packages.html :return: True/False - present/absent CUSTOM_GETPACKAGE_SCRIPT=F) file_name param_name separator default_val)detectget_boolean_paramCL_CONFIG_FILErarbrc_detect_old_lve_integrationz-CloudlinuxSummary._detect_old_lve_integration8s-'+1     rbc@tjdS)zO Detects presence/absence of lsapi :return: True/False /usr/bin/switch_mod_lsapirrexistsrarbrc_is_lsapi_presentz#CloudlinuxSummary._is_lsapi_presentGs w~~9:::rb interpreterc|dkrtstSnY|dkrtrtntS|dkrt stSn|dkrt stSt |}|tS|dvr@ |drtntS#t$r tcYSwxYw|dkr"| rtntStd|) zP Get selector status for nodejs, python, ruby and php selectors rxryrzphpN)rzrxselector_enabledzUnknown interpreter: ) rE NOT_INSTALLEDrFrrCrDr[get_selector_statusrrphp_selector_is_disabledr)rlibs rc_get_status_of_selectorz)CloudlinuxSummary._get_status_of_selectorOs8 ( " "/11 %$$ % F " "8::M77 M H $ $/11 %$$ % E ! !*C*E*E ! #K00 ; . . . %"%"9"9";";>>???s'B;;CCc tj|d}|S#tj$rW}tdt ||dt |iYd}~dSd}~wttf$r3}tdt |Yd}~dSd}~wwxYw)N )rz3Request exception while getting remote settings: %srz'Error while parsing remote settings: %s) rrrrrrrrrr)r settings_urlsettingsrs rc_get_remote_settingsz&CloudlinuxSummary._get_remote_settingsms |L"===BBDDHO( 5 5 5   RTWXYTZTZ [ [ [  (CFF!3 4 4 4 4 4 4 4 4 4I&      FA O O O44444 s!),CA B  C!(CCc|jdrdSttjd}|rdS||j}|dS |dd}|ddo||S#t$rW}t d t|| d t|iYd}~dSd}~wwxYw) z- Return cl-statistics status --force-collectTCL_TEST_SYSTEMNFz cl-statisticsz rollout-groupriz4Error occurred while trying to get rollout group: %sr) r|rrrrr SETTINGS_URL _match_serverrrrrr)ris_test_environmentr rollout_grouprs rc_is_statistics_enabledz(CloudlinuxSummary._is_statistics_enabledxs :>>+ , , 4"2:>>2B#C#CDD  4,,T->??  5 5$_5oFMO,Y7]D'A C99C>c"t|dS)Nint) hash_servers rc _to_numberzCloudlinuxSummary._to_numbers;###rbc|jdStj|jdd}||d|zzdkS)NTr)rhashlibsha256encode hexdigestr)rurl_numrs rcrzCloudlinuxSummary._match_serversa > !4nT^%:%:%<%<==GGII#2#N  ,,q'z9a??rbNcd}|r9ts/|dz}tjd|rt)dSdSdSdS)zC Wait for running background process of cl-summary 2rQg?N)rGtimesleep)retriess rc_wait_for_background_processz.CloudlinuxSummary._wait_for_background_processsu  8::  qLG JsOOO 8::         rbcL |jds |jdrBt|jdtjdd}t|ddS|jds |jdrBt |jdtjdd}t|ddS|jdrpt rd nd }tj|dd }|d tit|dtj d |j dr7| }| |t|j drts3|j ds|ddid ||j dr=||j|jdt(dnt|jddS|sIt.jdtjd}t3||ddid |j dr|j dsWtsIt.jdtjd}t3||ddid |jld}t(|t.jdt8d tjd}t3||d|i|j d!rt rtjd dd }npt3t.jtjdd"t=jd#dd$d%| tjdd}t|dtj d |jdr|j!rMt d&r=tjd dd }t|dtj d dSt3t.jtjdd"dSdS)'Nenabledisablesuccess timestamprT enable-rpm disable-rpmstatus collectingready)r%r(rsending_statusr get-remote)datarH rpm-packagesrrz\Sending RPM statistics is disabled by admin. Use --force-collect to ignore admin`s settings.) error_code--sendFsummaryurl save_statuszRPM statistics sentzkStatistics collection is disabled globally. Please, try again later or contact support if it happens again.)rrr%zYCollecting statistics is disabled globally. Use --force-collect to ignore global settingsz_Statistics collection is disabled by admin. Run `cloudlinux-summary enable` and then try again.zXSending statistics is disabled by admin. Use --force-collect to ignore admin`s settings.z8Statistics was not sent, because security token is emptyz^We are not able to collect statistics because we are not able to make a security token. Check z for details or contact support.--async)rr%rz9/usr/sbin/cloudlinux-summary --send --json &> /dev/null & /bin/bash)shell executablecheck) acquire_lock)"r|rJrr2rKrGrrAsysexitrr_print_result_and_exitrHrIr_get_rpm_packages_summary _send_statistics_and_save_statusr~RPM_PACKAGES_URLrrr r<FAILEDrLrrr IN_PROGRESS subprocessrunrr)rr-r(r status_dictrs rc&_actions_before_run_process_as_limitedz8CloudlinuxSummary._actions_before_run_process_as_limitedsq :h  4:i#8  ,TZ-A B B B!% BBD T4 ( ( ( F :l # tz-'@  0L1I J J J!% BBD T4 ( ( ( F :h  %?%A%AN\\wF!%)TTD KK)+O+Q+QR S S S T4 ( ( ( HQKKK :>>, ' ' b**,,F  ' 'VJ^J`J` ' a a a :>>. ) ) +-- djnnEV6W6W $$ #J ! %  * * , , ,z~~h'' 855 O- %6  56666 $777 F**,, '.R!Y[[ K 1 = = =  D !    :>>( # # ::>>"344 =Q=S=S +2J!%  5[AAA$$ #J ! %"*T  )))+26GO666"&  5[AAA$$h%8999 :>>) $ $ )++ G&*Y[[LT]^^ 5,8ty{{^bccO*  11333%)Y[[IFF T4 ( ( ( HQKKK :h  * /IW[/\/\/\  &*Y[[LT]^^ t,,, 5,8ty{{^bcc  rbc tjtjddd}tj|5}|dt |gt jddt |dg|zttj d tj tj   cd d d S#1swxYwYd S) z Run same command in lve and set environ RUNNING_IN_LVE=1 in order to check it in child process. :return: ri@)ls_cpuls_cpus ls_memory_phy--lve-idz/bin/lve_suwrapper-n/usr/sbin/cloudlinux-summary1)rCPU_DATAenvN) lvectllibmake_liblve_settingscreate_liblve_settings temporary_lveextendrrCcallrrrrdumps CPUINFO_DATA)argsrlve_ids rc_run_self_in_lvez"CloudlinuxSummary._run_self_in_lve1s1  ,,      $X . . & KKS[[1 2 2 2?%tS[[:XY\``J#&"Z (>??                      sBCCCcjtjgd|zttjdS)z Run same command using utility `nice` and set environ RUNNING_BY_NICE=1 in order to check it in child process. :return: )z /usr/bin/nicerM19rNrO)rrQ)rCrXrrr)r[s rc_run_self_by_nicez#CloudlinuxSummary._run_self_by_niceMsE I I ID P #    rboptsc|tfddDrdStfddDrdSdS)zK Check that passed command should run as unlimited process c3(K|] }|V dSr`raroptionras rcrzECloudlinuxSummary._should_run_as_unlimited_process..as;    L       rb)r.r(r,r!r"r&r'Tc3(K|] }|V dSr`rards rcrzECloudlinuxSummary._should_run_as_unlimited_process..ns;   L      rb)r0r5--jsonrF)rr)ras`rc _should_run_as_unlimited_processz2CloudlinuxSummary._should_run_as_unlimited_process\s          4          5urbc|||_|jr)|||jrt jddSttj s+| |}t j|dS | |}t j|dS#tj $rc}d|}t|tjt"}||dt jdYd}~dSd}~wwxYw||jr]d}t'j|d}t(||jt-|dt jd |dS) Nrz"failed to run task in lve, error: T)exc_infoz|You shouldn't use env var "RUNNING_IN_LVE" or "RUNNING_BY_NICE" for run of any command except collection of main statistics.r$)extrarQ) _parse_argsr|rrFrhr;r<rrLVEr`r]rS PyLveErrorprintlogging getLogger__name__ exceptionrrrr2run_get_summary)rargvrcr error_msglogerr_msgr-s rcrDzCloudlinuxSummary.runzs%%d++  &( #  7 7 9 9 944TZ@@ ! / << !++D11 !..t44BHRLLLLL +!!! HQ H HI)$$$!+H55CMM)dM;;;HRLLLLLLLLL !44TZ@@ *"&%    ;;; t,,,  " " " " "s,)CE &AEE ctj}|tj|z }||jd<|jdr0|jt |j|ddd|jdr>||j|j dt d dSt|jddS) Ncl_summary_execution_timerLrcl_summary_max_mem_usedz,Can't get memory usage by cloudlinux-summaryr0Tr1zMain statistics sent) r _get_summaryr~r| add_metricr_get_max_memoryrr?rrrr2)r start_time running_times rcruz!CloudlinuxSummary.run_get_summarysY[[  y{{Z/ 7C34 :j !  O & &,l;;)>     :>>( # # 4  1 1$  2    OO2 3 3 3 3 3 T_d 3 3 3 3 3rbr%summary_resultcvtj|d}|dkr||d<tj|d<t|dS)z@ Save status of sending statistics to json file rr%r#rrN)r<SUCCESSrArL)r%rrEs rc _save_statuszCloudlinuxSummary._save_statussJ "/!6YOO Y & &$2K !$1$8K !,[99999rbr2r3r4cttj}||d<|||}||d}t|d|r|||dSdS)zH Send statistics data to server and save status to file r%)r3rTN)rr_send_statisticsr2r)rr2r3r4r%s_resultrs rcr?z2CloudlinuxSummary._send_statistics_and_save_statuss $$ ( ((c(::$9==&&&            rbc |dz }|dkrdSdddt|jdddd ttj|d g} t |d \}}}n3#t $r&}td |Yd}~dSd}~wwxYw|dkrLtj |} td|dDS#ttf$rYdSwxYwtd||dS)NrrQz/usr/sbin/lveinforgz--idrLz--show-columnsmPMemz--periodmTreturn_full_outputz Unable to run lveinfo, error: %src3&K|] }|dV dS)rNrarxs rcrz4CloudlinuxSummary._get_max_memory..s&CC!1W:CCCCCCrbr-z-lveinfo failed with exit code: %i, output: %s)rr|rmathceilr-r#rwarningrloadsmaxrrr) rr time_minutescmdrwjson_strrr parsed_datas rcrz!CloudlinuxSummary._get_max_memorysM#b( !  4     :& ' '   49\**++ . . .   )#$GGGOB!!$      A1 E E E44444  77*X..K CC{6/BCCCCCC)   tt H"hWWWts*A)) B3BB7CC+*C+cfd} d|}t|tjd}t dD]P} tj||d}n7#tj$r#}|}tjd|zYd}~Id}~wwxYw||j d krtd n,d |j d |j }t|nE#tj$r3}t|}t |Yd}~nd}~wwxYw|S) z Sends statistics to server :param data: Statistics data dict :return: string - message for JSON 'result' key r#zSending statictics to server z*Unknown exception while sending statisticsr)rrNzSending statictics OKrr) rrrrrpostConnectionErrorrrrrrr)r-r3 out_messager expected_errirerrs rcrz"CloudlinuxSummary._send_statisticsst  *;c;;G OOG $ $ $#45abbL1XX # #'}StRHHHH E  /%%%#&LJq!t$$$$$$$$% #"#s** 78888nX=Qnn]e]lnn  ,,,( * * *c((K   [ ) ) ) ) ) ) ) ) *sCAC, A" C,"B1B C,BAC,,D.;)D))D.cdtjd}||j||SNrQ)versionr%)r_prepare_cl_normal_statisticsr~rrrs rcr~zCloudlinuxSummary._get_summarysBTY[[99 **,,, v&&& rbcdtjd}||j||Sr)r'_fill_dict_with_rpm_packages_statisticsr~rrs rcr>z+CloudlinuxSummary._get_rpm_packages_summary!sBTY[[99 44666 v&&& rbc@tjtjS)z. Get version of control panel )rgetCP CP_VERSIONrarbrc_get_panel_versionz$CloudlinuxSummary._get_panel_version's    rbc.|jtjd\}}|st|jd<dS|H||jd<|jdddd|jd ddd dSt |jd<dS) zN Fill dict with statistics by statistics about MySQL governor zCan't get MySQL governor modemysql_governor_statusNmysql_governor_modecBtSr`)rget_governor_versionrarbrcrpzCCloudlinuxSummary._fill_mysql_governor_statistics..>s <<>>rbrmysql_governor_versionz Can't get MySQL governor versioncNtdSNr)rget_governor_statusrarbrcrpzCCloudlinuxSummary._fill_mysql_governor_statistics..Ds ;;==a@rbzCan't get MySQL governor status)r~ evaluate_safer0get_gov_mode_operationERRORrr)rr#mysql_gov_modes rc_fill_mysql_governor_statisticsz1CloudlinuxSummary._fill_mysql_governor_statistics0s #'/"?"?  2 +# #  E7>(2     O & &@@'1      8EDO3 4 4 4rbc|jtjddd|jdddd|j|jddd |j|jdd d |jt d d d|jdd ddtjtjkr"|j|j d dd|j|j d dd|jtd dddS)zM Fill dict with statistics by statistics about control panel rcontrol_panel_namezCan't get control panel namec`dtjDS)Ncg|] \}}|| Srara)rname is_supporteds rc zVCloudlinuxSummary._fill_control_panel_statistics....Xs#nnn0dLamnTnnnrb)rget_supported_cl_featuresitemsrarbrcrpzBCloudlinuxSummary._fill_control_panel_statistics..Xs*nnE4S4U4U4[4[4]4]nnnrbstr_listsupported_cl_featuresz8Can't get list of supported cl features by control panelcontrol_panel_versionzCan't get control panel versioncontrol_panel_apachezCan't get control panel apacher nginx_runningzCan't get control panel nginxcBttjSr`)lenrcpusersrarbrcrpzBCloudlinuxSummary._fill_control_panel_statistics..ks3u}+?+?rb users_totalzCan't get amount of usersinstalled_via_plesk_extz8Can't determine if CL was installed from Plesk Extensionlogin_via_whmcs_in_usez)Can't determine if Login via WHMCS in userz Can't if that is WP2 environmentN) r~rr getCPNamer_get_control_panel_apacher)r PLESK_NAME_is_installed_via_plesk_ext_is_login_via_whmcs_in_userrs rc_fill_control_panel_statisticsz0CloudlinuxSummary._fill_control_panel_statisticsLs ""    *    "" n n  # F    ""  #  # -     ""  *  " ,    ""#3UOMlmmm ""#?#? Wrsss    !1 1 1 O & &0)J     ""  +  $ 7     "" ';=_     rbc d}tjtjkr|Sgd}t j|ddd}t j|j}d|vr{d|dvrq|ddD]b}|ddkrTd }t| d d | d d | d d grd}nc|S)zA Determine whether the login method is via WHMCS rk)z/usr/local/cpanel/bin/whmapi1&get_available_authentication_providersz--output=jsonprettyT)capture_outputrr9r- providers provider_namewhmcsrwhostmgrd_enabledFcpaneld_enabledwebmaild_enabledrQ) rrr CPANEL_NAMErCrDrrstdoutrrr)r(commandrr-providers rcrz,CloudlinuxSummary._is_login_via_whmcs_in_uses     !2 2 2Mttt4tTTTz&-(( T>>kT&\99 L5  O,77F$LL)>' " " F rbctr/tjrd}nDtjrd}n.d}n+|jddkrtjrdnd}nd}|S) z Wrapper to retrieve control panel Apache version: EA3 or EA4 for cPanel, native otherwise :return: EA3|EA4|native litespeed openlitespeedunknown_litespeedrcPanelEA4EA3native)r(rdetect_enterprise_litespeeddetect_open_litespeedr~is_ea4rs rcrz+CloudlinuxSummary._get_control_panel_apaches~ ! ! 133 -$-// -(- _1 2h > >$moo8UU5FFF rbctj}||Stjttjt dt dti}||dS)z Wrapper to convert internal values from cagefs_statistics_config.get_cagefs_status function to values for statistics :return: NEnabledDisabledUnknown) r.get_cagefs_statusCAGEFS_STATUS_NOT_INSTALLEDrCAGEFS_STATUS_NOT_INITIALIZEDNOT_INITIALIZEDrrr) cagefs_statuscagefs_status_maps rc_cagefs_status_wrapperz(CloudlinuxSummary._cagefs_status_wrappersX1BDD   $ @- $ BO w    !$$]I>>>rbc|j|jddd|jdttfvr d|jd<n'|jt jddd|jtt jdddd |jtt jd dd d dS) zF Fill dict with statistics by statistics about CageFS rrzCan't get CageFS statusNcagefs_user_modezCan't get CageFS user modeTcagefs_enabled_quantityz/Can't get quantity of users with enabled CageFSFcagefs_disabled_quantityz0Can't get quantity of users with disabled CageFS) r~rrrrr.get_cagefs_user_moder get_quantityrs rc_fill_cagefs_statisticsz)CloudlinuxSummary._fill_cagefs_statisticss ""  '   %    ?? + /O O O26DO. / / O & &(=",     "" ,94 @ @  % =    "" ,95 A A  & >      rbcD td|jD}n#tj$rYdSwxYwt |jjtfd| DS)zJ Get amount of end-users which belong to active resellers c3,K|]\}}|dk |VdSrNrarrlvps rcrzLCloudlinuxSummary._get_amount_of_endusers_under_resellers..2YY3QTWXQXQXQXQXQXQXYYrbNc3 K|]}|vV dSr`ra)rlvp_idenabled_lvp_ids rcrzLCloudlinuxSummary._get_amount_of_endusers_under_resellers..s(OO6^+OOOOOOrb) rr lve_lvp_pairsrrMsetname_mapid_listsumelements)r lvp_countr s @rc'_get_amount_of_endusers_under_resellersz9CloudlinuxSummary._get_amount_of_endusers_under_resellerss YY$+2K2K2M2MYYYYYII!   44 T[199;;<<OOOO):L:L:N:NOOOOOOs04AAc td|jD}n#tj$rYdSwxYwt |S)z/ Get total amount of end-users c3,K|]\}}|dk |VdSrrars rcrzBCloudlinuxSummary._get_total_amount_of_endusers.. r rbN)rrrrrMrrt)rrs rc_get_total_amount_of_endusersz/CloudlinuxSummary._get_total_amount_of_enduserssr YY$+2K2K2M2MYYYYYII!   44 9##%%&&&s03AAcp ttjS#tj$rYdSwxYw)z) Get amount of resellers N)rr resellersrMrarbrc_get_amount_of_resellersz*CloudlinuxSummary._get_amount_of_resellerssB  u(()) )!    DD s "55cjtjjdddjtjjdddjtjjdddjjddd jjdd d jj dd d jfddddjdr jdddddSdjd<djd <djd<dS)zP Fill dict with statistics by varied statistics about resellers r reseller_limits_supported_kernelz8Can't detect status of support reseller limits by kernel'reseller_limits_supported_control_panelz?Can't detect status of support reseller limits by control panelreseller_limits_enabledz1Can't detect status of support of reseller limitsresellers_totalz#Can't get total amount of resellers(resellers_endusers_under_reseller_limitsz>Can't get amount of end-users which belong to active resellersresellers_endusers_totalz#Can't get total amount of end-usersc,Sr`)_get_resellers_with_faultsrsrcrpz>CloudlinuxSummary._fill_resellers_statistics..FsD3355rbresellers_with_faultsz:Can't get amount of resellers with faults for the past 24hc\tttjSr`)rlistrSlvp_listrarbrcrpz>CloudlinuxSummary._fill_resellers_statistics..MsD!3!5!56677rbresellers_activez$Can't get amount of active resellersN) r~rrSlveis_lve10is_panel_supportedreseller_limit_supportedrrrrs`rc_fill_resellers_statisticsz,CloudlinuxSummary._fill_resellers_statisticss "" M "  . F    "" M ,  5 M    "" M 2  & ?     ""  )   1    ""  8  6 L    ""  .  & 1    "" 5 5 5 5  # H    ?4 5 < O & &77"6      37DO. /JNDOF G7;DO3 4 4 4rbxml_cfg_providerc|jt|jjt jjt jddd|jt|jjt jddd|jfdddd |jfd dd d |jfd ddd|jfdddd|jfdddd|jt|j jt j ddd|jt|j jt j ddddS)zN Fill dict with statistics by statistics about default limits rdefault_limit_speedzCan't get default speed limitrdefault_limit_cpu_origin_unitsz+Can't get cpu origin units of default limitc2jtjSr`)defaultsr4ncpur/srcrpzCCloudlinuxSummary._fill_default_limits_statistics..m$-h7<rbdefault_limit_ncpuzCan't get default ncpu limitc2jtjSr`)r4r4ior6srcrpzCCloudlinuxSummary._fill_default_limits_statistics..s$-h7:rbdefault_limit_iozCan't get default io limitc2jtjSr`)r4r4nprocr6srcrpzCCloudlinuxSummary._fill_default_limits_statistics..ys$-h7=rbdefault_limit_nproczCan't get default nproc limitc2jtjSr`)r4r4epr6srcrpzCCloudlinuxSummary._fill_default_limits_statistics..r;rbdefault_limit_epzCan't get default ep limitc2jtjSr`)r4r4iopsr6srcrpzCCloudlinuxSummary._fill_default_limits_statistics..r7rbdefault_limit_iopszCan't get default iops limitdefault_limit_vmem_mbzCan't get default vmem limitdefault_limit_pmem_mbzCan't get default pmem limitN) r~rr_cpu_limit_to_percentsr4r4cpur5_get_cpu_limit_units_mempages_to_mbvmempmemrr/s `rc_fill_default_limits_statisticsz1CloudlinuxSummary._fill_default_limits_statisticsWs "" + )(37 )(38    ! +  "" D-/?/H/R/V W W  , 9    "" < < < <  *    "" : : : :   (    "" = = = =  ! +    "" : : : :   (    "" < < < <  *    "" D(*:*CH*M*R S S  # *    "" D(*:*CH*M*R S S  # *      rbc |jfdddd|jfdddd|jfddd d |j|jdd d d S)z Fill dict with statistics by other statistics about limits: packages_total, users_total, amount users/packages with custom limits c,tjSr`)rpackagesr6srcrpzACloudlinuxSummary._fill_other_limits_statistics..sC(122rbrpackages_totalz"Can't get total amount of packagescFtSr`)rget_packages_with_custom_limitsr6srcrpzACloudlinuxSummary._fill_other_limits_statistics..sC(HHJJKKrbpackages_with_custom_limitsz/Can't get amount of packages with custom limitscFtSr`)rget_users_with_custom_limitsr6srcrpzACloudlinuxSummary._fill_other_limits_statistics..sC(EEGGHHrbusers_with_custom_limitsz,Can't get amount of users with custom limitsusers_with_faultsz6Can't get amount of users with faults for the past 24hN)r~r_get_users_with_faultsrNs `rc_fill_other_limits_statisticsz/CloudlinuxSummary._fill_other_limits_statisticss "" 2 2 2 2   0    "" K K K K  ) =    "" H H H H  & :    ""  '   D      rbctddD]}jtj||d|d\}|rdSjfddd|d d jfd d d|d d jfdd d|dd jfddd|dd jfdd d|dd jfdd d|dd jfdd d|dd jfdd d|dd jfdd d|dd jfdd d|dd jfdd d|dd dS) zV Fill dict with statistics by statistics about top packages on server rQrzCan't get top z package by usersNcdjSNrQr top_resultsrcrpzACloudlinuxSummary._fill_top_packages_statistics..s 1 *rbrtop_ _package_name log_messagec.tdSrrrasrcrpzACloudlinuxSummary._fill_top_packages_statistics..sJqM**rbr_package_users_numcdjptjdjptjSr_)rHlimitsr6rIr5rrbsrcrpzACloudlinuxSummary._fill_top_packages_statistics..s;33])9\>])9\?rb_package_limit_speedc\djptjSr_)rJrjr6rIrksrcrpzACloudlinuxSummary._fill_top_packages_statistics..s)11])9\>rb_package_limit_cpu_origin_unitsc6djptjSr_)rjr6r5rasrcrpzACloudlinuxSummary._fill_top_packages_statistics..A-=Crb_package_limit_ncpuc6djptjSr_)rjr6r:rasrcrpzACloudlinuxSummary._fill_top_packages_statistics..A-=Arb_package_limit_ioc6djptjSr_)rjr6r>rasrcrpzACloudlinuxSummary._fill_top_packages_statistics..sA-=Drb_package_limit_nprocc6djptjSr_)rjr6rArasrcrpzACloudlinuxSummary._fill_top_packages_statistics..rsrb_package_limit_epc6djptjSr_)rjr6rDrasrcrpzACloudlinuxSummary._fill_top_packages_statistics..rprb_package_limit_iopsc\djptjSr_)rKrjr6rLrksrcrpzACloudlinuxSummary._fill_top_packages_statistics..$,,jm.B.Rl-XYYrb_package_limit_vmem_mbc\djptjSr_)rKrjr6rMrksrcrpzACloudlinuxSummary._fill_top_packages_statistics.. r|rb_package_limit_pmem_mb)rr~rr#_get_top_package_by_number_of_usersr)rr/rr#rbs` @rc_fill_top_packages_statisticsz/CloudlinuxSummary._fill_top_packages_statisticsss q!R R A"&/"?"?@!EUVV5555## GZ  j0 O & &****'q''' '    O & &****,q,,, '    O & &.q...  '    O & &9q999 '    O & &CCCC-q--- '    O & &AAAA+q+++ '    O & &DDDD.q... '    O & &AAAA+q+++ '    O & &CCCC-q--- '    O & &YYYYY0q000 '    O & &YYYYY0q000 '    [R R rbct}||||||dS)zN Fill dict with statistiscs by varied statistics about limits N)r5rOr\rrNs rc_fill_limits_statisticsz)CloudlinuxSummary._fill_limits_statisticssU-.. ,,-=>>> **+;<<< **+;<<<<.)sv.x8rbrlsapi_criu_service_statusrec ddS)Nrrrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics../sv.y9rblsapi_criu_service_versionc ddS)N lsapiConf lsapi_criurarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..5s{3LArblsapi_option_criuc ddS)Nrlsapi_with_connection_poolrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..;s{34PQrblsapi_option_connection_poolcdS)N libVersionrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..A |4rblsapi_lib_versioncdS)N modStatusrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..Gs {3rbcdS)N modVersionrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..Mrrblsapi_mod_versioncdS)N totalDomainrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..Ss }5rbrlsapi_total_domain_countcdS)N domainStatrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics..Yrrbint_dictlsapi_domain_statcdS)N controlPanelrarsrcrpz:CloudlinuxSummary._fill_lsapi_statistics.._s ~6rblsapi_apache_environment)r~rget_raw_lsapi_inforrr)rr#rs @rc_fill_lsapi_statisticsz(CloudlinuxSummary._fill_lsapi_statisticss #'/"?"?  # *# # A @27DO. / / /  ' O & &8888+ '    O & &9999, '    O & &AAAA# '    O & &QQQQ. '    O & &4444# '    O & &3333" '    O & &4444# '    O & &5555* '    O & &4444# '    O & &6666* '     3@DO. / / /rbcJ|j|jddddS)Nstr_dict wmt_configz!Cant get status of wmt_api_config)r~r_get_wmt_api_configrs rc_fill_wmt_settings_statisticsz/CloudlinuxSummary._fill_wmt_settings_statisticsgs3 ""  $j,@c     rbc |\}nF#t$r9}tdt |ggic}Yd}~nd}~wwxYwt t t |z } ||\nD#t$r7}tdt |iicYd}~nd}~wwxYw|r$dt|i|j fdddd|j fdd d d |j fd d d d|j fdddd|j fdddd|j fdd dddS)Nz+Error while getting WordPress statistics %sz3Error while getting WordPress plugins statistics %scloudlinux_wpos_object_cachec"tSr`r) all_wp_pathssrcrpz7CloudlinuxSummary._fill_wp_statistics..sC %%rbrwordpress_installed_totalz,Can't get total count of installed wordpresscSr`raobject_cache_pluginssrcrpz7CloudlinuxSummary._fill_wp_statistics..s(rbrwordpress_object_cache_pluginsz&Can't get WP object cache plugins infocSr`raadvanced_cache_pluginssrcrpz7CloudlinuxSummary._fill_wp_statistics..s*rb wordpress_advanced_cache_pluginsz(Can't get WP advanced cache plugins infocFtSr`rrtrsrcrpz7CloudlinuxSummary._fill_wp_statistics..sC,335566rb$wordpress_object_cache_plugins_totalz,Can't get WP object cache total plugins infocFtSr`rrsrcrpz7CloudlinuxSummary._fill_wp_statistics..sC.557788rb&wordpress_advanced_cache_plugins_totalz.Can't get WP advanced cache total plugins infocSr`ra)wp_php_versionssrcrpz7CloudlinuxSummary._fill_wp_statistics..sOrbwordpress_php_versionszCan't get WP php version info) _prepare_wp_statistics Exceptionrrrr'r_prepare_wp_plugins_statisticsrrr~r)rpaths_with_wpos_object_cacherwithout_wpos_object_cacherrrrs @@@@rc_fill_wp_statisticsz%CloudlinuxSummary._fill_wp_statisticsls UJNJeJeJgJg GL6 U U U   JCPQFF S S SJLbRT GL6 U%)\):):SA]=^=^)^$_$_! B;?;^;^)<< 8 "8"8 B B B   RTWXYTZTZ [ [ [;=r 8 "8"8"8"8"8"8 B ( m ' ')GMiIjIj(k l l l "" % % % %  ' :    "" ( ( ( (  , 4    "" * * * *  . 6    "" 6 6 6 6  2 :    "" 8 8 8 8  4 <    "" # # # #Z1IKj     s, A"/AA"B++ C,5-C''C,cB |\nC#t$r6}tdt |ggYd}~nd}~wwxYw|jfdddd|jfdddddS) Nz4Error while getting per-user WordPress statistics %sc"tSr`r) users_with_wpsrcrpz@CloudlinuxSummary._fill_per_user_wp_statistics..sC &&rbr$users_count_with_wordpress_installedz7Can't get total count of users with wordpress installedc"tSr`r)users_with_wp_and_litespeedsrcrpz@CloudlinuxSummary._fill_per_user_wp_statistics..sC344rb0users_count_with_wordpress_and_lscache_installedzECan't get total count of users with wordpress and LiteSpeed installed)_prepare_per_user_wp_statisticsrrrrr~r)rrrrs @@rc_fill_per_user_wp_statisticsz.CloudlinuxSummary._fill_per_user_wp_statisticss -9=9]9]9_9_ 6M66 - - -   SUXYZU[U[ \ \ \M*, ' ' ' ' ' ' - "" & & & &  2 E    "" 4 4 4 4  > S      s A,AAcb|d|}|d|}||fS)zq Prepares dict with plugin-counter pairs e.g: {'w3-total-cache': 4, 'redis': 1, 'ls': 2} object-cacheadvanced-cache)_get_plugin_info)rwp_pathsrrs rcrz0CloudlinuxSummary._prepare_wp_plugins_statisticss= $44^XNN!%!6!67G!R!R#%;;;rb plugin_typercttdfd|D}tt}|D]}||xxdz cc<|S)Nc0g|]}t|Sra)r)rrrs rcrz6CloudlinuxSummary._get_plugin_info..s%1n1n1n]a2EdK2X2X1n1n1nrbrQ)r'filterrr)rrrobject_plugin_counter_pairsplugins` rcrz"CloudlinuxSummary._get_plugin_infoss#F41n1n1n1nem1n1n1n$o$opp&1#&6&6#* 5 5F ' / / /1 4 / / / /**rbcjgg}}tt}tj}|D]} tj|}n#t $rY%wxYwtt }|D]?\}} tj | r||  |@|D]~} | || |} | d} | d} | | | | d| r#| dkr|| xxt| z cc<|||fS)z Return Wordpress absolute paths, paths with install WPOS object cache module and counter of php versions that are used by these Wordpresses. r php_version'wp_paths_with_enabled_wpos_object_cache undefined)rrrr userdomainsrr'rrrappend_get_docroot_wp_inforWr) rr$paths_with_enabled_wpos_object_cache php_versions panel_usersuser domains_infodocroot_domains_mapdomaindocroot docroot_infodocroot_wp_pathsdocroot_php_versions rcrz(CloudlinuxSummary._prepare_wp_statisticss >@: "3'' moo  O OD $066     #.d"3"3 #/ @ @7>>'**@'077???. O O#88wH[\\ #/ #; &2=&A###$45554;;LIr>'**@'077???. : :#88wH[\\ |J/00144!%%d+++|$KLMMPQQQ/33D999  :999sA  B(BBrrrcggtdd}fdtD}|s|Sfd|D|d<fdt||D|d<|dD]d}t|d}|d |vr|d |t|d }|d |vr|d |eD]$} || } | dkr| |d <n%|S)zM Return data about docroot's WP paths and used php versions. r)rrrrcg|]J}tj|ks"tj|vH|KSra)rrr)rwp_pathrrs rcrz:CloudlinuxSummary._get_docroot_wp_info..sZ    Wg..'99RW\\'SZ=[=[cv=v=v =v=v=vrbcTg|]$}t|%Srar joinpathrrrs rcrz:CloudlinuxSummary._get_docroot_wp_info..s-#V#V#VTDMM$:$:4$@$@#V#V#VrbrcXg|]&}|t|'Sr`rrs rcrz:CloudlinuxSummary._get_docroot_wp_info..s@C C C  MM " "4 ( (rbrrNrrrr)rrrrr_get_php_version_for_domain) rrrrrrrobject_cache_pluginadvanced_cache_pluginrrs `` rcrz&CloudlinuxSummary._get_docroot_wp_infos7958UU&        (11     #V#V#V#VX#V#V#V Z C C C C 8xHHC C C >? !, P PD"5dN"K"K ".;BU3U3UDEII$OOO$7>N$O$O !$0[DY5Y5YDEII$OOO)'2  F::6BBKk)).9 ]+*rbrctjtjtjtjfvrdS|\}}}||i}|dd}tjtjkr||kr|S|D],\}}||vr#|dkrd| dd} | cS-tjtjkrd| dd} | StjtjkrE|dd} |d t|   d } | pdS|S) z Return php version that is used for specified domain. Determine whether of MultiPHP Manager or PHP Selector is used. rphp_version_idrzalt-php.rzda-php handler_typeN-) rrrrDIRECTADMIN_NAMEr_get_system_php_inforrreplacerr) rrsystem_default_php_versiondomains_php_infoselector_php_infophp_infomulti_php_versionrdomainsalt_php_versionda_php_versionhandlerrs rcrz-CloudlinuxSummary._get_php_version_for_domain6s    e&79OQVQa%b b b;JNJcJcJeJeG"$46G$''33$LL)9;GG    !2 2 27QUf7f7f$ $!2 7 7 9 9 ' ' GW  W%8%8"FGOOC,D,D"F"F&&&&    !7 7 7J&7&?&?R&H&HJJN! !    !1 1 1ll>266G+Os7||mO<BB3GGK-+ -  rb)maxsizec tjd}n#t$rd}YnwxYwtj}t }| |d}ni}|||fS)z Return info about: - system_php_version (implemented only on cPanel) - domains_php_info (php versions and handlers turned on in MultiPHP) - selector_php_info (php version used by panel users via PHP Selector) default_version_idNdomains_by_php_version)rget_system_php_inforget_domains_php_inforX)system_php_versionrphp_selector_usagers rcrz&CloudlinuxSummary._get_system_php_info\s &!&!:!. y/Brbr ssa_configzCan't get SSA configcdS)Nrrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s ),rbr ssa_versionzCan't get version of SSAcdS)Nr(rarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..rrbzCan't get state of SSAcdS)N agent_statusrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s .1rbssa_agent_statuszCan't get state of SSA agentc ddS)N autotracingr(rarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s -0:rbautotracing_statusz"Can't get state of SSA Autotracingc ddS)Nr&disabled_users_quantityrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s -01JKrbr#autotracing_disabled_users_quantityz1Can't get state of SSA Autotracing disabled usersc ddS)Nr& rules_versionrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics.. -0Arbautotracing_rules_versionz'Can't get SSA Autotracing rules versionc ddS)Nr&urls_processedrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s -01ABrbautotracing_urls_processedz.Can't get SSA Autotracing processed URLs countc ddS)Nr& urls_selectedrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..r-rbautotracing_urls_selectedz-Can't get SSA Autotracing selected URLs countc ddS)Nr&rejectsrarsrcrpz8CloudlinuxSummary._fill_ssa_statistics..s -0;rbrautotracing_rejectsz!Can't get SSA Autotracing rejects)r~r get_ssa_statsrrr)rr#rs @rc_fill_ssa_statisticsz&CloudlinuxSummary._fill_ssa_statisticsts;"_::   &    ,1DOL ) F  O & &'B'B'B'BJP\^t u u u O & &,,,,e]D^    O & &'B'B'B'BE.s+E22rbz+Can't get statistics about PHP interpretersselector_php_statusNrrz Can't get status of PHP selectorrselector_php_versions_installedreselector_php_versions_enabledselector_php_version_defaultz,Can't get default version of PHP interpreterselector_php_version_nativez+Can't get native version of PHP interpreterrselector_php_enabled_uiz%Can't get state of UI of PHP selectorselector_php_modezCan't get mode of PHP selectorz'Can't get summary usage of PHP selector'selector_php_num_domains_by_interpreter%selector_php_num_users_by_interpretercLddDS)Nc4i|]\}}|t|Srarrvr s rc zUCloudlinuxSummary._fill_php_selector_statistics....s$sssGQG sssrbrrphp_usage_summarysrcrpzACloudlinuxSummary._fill_php_selector_statistics..s)ss?PQi?j?p?p?r?rsssrbrcLddDS)Nc4i|]\}}|t|SrarrGs rcrIzUCloudlinuxSummary._fill_php_selector_statistics....s$qqqGQG qqqrbusers_by_php_versionrJrKsrcrpzACloudlinuxSummary._fill_php_selector_statistics..s)qq?PQg?h?n?n?p?pqqqrb)r~rrrrr"_get_list_versions_of_interperters INSTALLEDrrUrWr[php_selector_is_enabledrVrXr)rr#php_interpretersrLs @rc_fill_php_selector_statisticsz/CloudlinuxSummary._fill_php_selector_statisticss %)O$A$A 2 24a% % !!B C5:DO1 2 2 2  ) O & &4e<<%2     O & &?AQS\]]1 '    O & &?AQSZ[[/ '    O & &'.>     O & &'-=     O & &%e,,D)7     O & &(#0     *.)F)F&9** &G& /7MQ IJKO GHHH**ssss= $ + **qqqq; $ +6CDO1 2 2 2rb total_appsamount_of_apps_per_domainc(|dks|dkrdS||zS)z Get average amount of applications per domain :param total_apps: total amount of applications :param amount_of_apps_per_domain: amount of applications per domain rQNra)rUrVs rc_get_average_apps_per_domainz.CloudlinuxSummary._get_average_apps_per_domains) >>6::4666rbamount_of_apps_per_userc(|dks|dkrdS||zS)z Get average amount of applications per user :param total_apps: total amount of applications :param amount_of_apps_per_user: amount of applications per user rQNra)rUrYs rc_get_average_apps_per_userz,CloudlinuxSummary._get_average_apps_per_user s) >>4q884444rbappsc4td|DS)z Get amount of running applications on server :param apps: list of applications for something selector c6g|]}|j |jdk|S)started) app_status)rapps rcrz@CloudlinuxSummary._get_amount_of_runned_apps..s,ZZZC3>ZcnPY>Y>YC>Y>Y>Yrbr)r\s rc_get_amount_of_runned_appsz,CloudlinuxSummary._get_amount_of_runned_appss!ZZ4ZZZ[[[rbct}|D]}||jxxdz cc<|dpdg}|ddS)z Get maximum amount of applications per domain :param apps: list of applications for something selector rQrrr)rdoc_root most_common)r\apps_per_domainra most_commonss rc_get_max_apps_per_domainz*CloudlinuxSummary._get_max_apps_per_domain sh")) / /C CL ) ) )Q . ) ) ) )'22155A& Aq!!rbct}|D]}||jxxdz cc<|dpdg}|ddS)z~ Get maximum amount of applications per user :param apps: list of applications for something selector rQrdr)rrrf)r\ apps_per_userrarhs rc_get_max_apps_per_userz(CloudlinuxSummary._get_max_apps_per_user0sh  ) )C #( # # #q ( # # # #%0033?x Aq!!rbcVt}|D]}||jxxdz cc<|S)z Get Counter object which contains amount applications per version of interpreter :param apps: list of applications for something selector rQ)rr)r\apps_per_versionras rc_get_counter_apps_per_versionz/CloudlinuxSummary._get_counter_apps_per_version@sD#99 / /C S[ ) ) )Q . ) ) ) )rbcx||}|dpdg}|ddS)z Get maximum amount of applications per version of interpreter :param apps: list of applications for something selector rQrdr)rorf)rr\rnrhs rc_get_max_apps_per_versionz+CloudlinuxSummary._get_max_apps_per_versionMsC  ==dCC(33A66B6( Aq!!rbczt}|D]}||jt|S)zz Get amount of domains with applications :param apps: list of applications for something selector )rrrer)r\r ras rc _get_amount_of_domains_with_appsz2CloudlinuxSummary._get_amount_of_domains_with_appsZs?%% & &C KK % % % %7||rbczt}|D]}||jt|S)zx Get amount of users with applications :param apps: list of applications for something selector )rrrr)r\usersras rc_get_amount_of_users_with_appsz0CloudlinuxSummary._get_amount_of_users_with_appsgs?  C IIch    5zzrbcJ||}t|S)z Get amount of applications per each version of interpeters :param apps: list of applications for something selector )ror)rr\rns rc4_get_amount_of_apps_per_each_version_of_interpreterszFCloudlinuxSummary._get_amount_of_apps_per_each_version_of_interpretersts'  ==dCC$%%%rbinterpreters_statsstatecDfd|DS)z Get list of versions of interpreters on server :param interpreters_stats: dict with varied statistics about each version of interpeters :param state: state of interpeters (installed, enabled) c*g|]\}}| |Srara)rinterpreter_statsstatrzs rcrzHCloudlinuxSummary._get_list_versions_of_interperters..s,kkk&=&7_cdi_jk!kkkrbrJ)ryrzs `rcrPz4CloudlinuxSummary._get_list_versions_of_interperters~s-lkkkASAYAYA[A[kkkkrbcFt|}|t|SgS)zI Get list of apllications on server for defined selector )rZr')r iter_appss rc_get_list_of_applicationsz+CloudlinuxSummary._get_list_of_applicationss( -[99   ?? " rbc X|jD]}|jtt|d|d\}}|t |jd|zdz<P|st |jd|zdz<h|jt|j|dd|zdz|rd|dnd|jt|j |td d|zd zd |jt|j |td d|zd zd |jt|j |d |d\}|sY|jfddd|zdzd |jd|zdzdk|jd|zdz<|jt|j dd|zdzd |jtt|d|d\}}|r|||jd|zdz<|jt|jdd|zdzd|d|jt|jdd|zdzd|d|jt|jdd|zdzd|d|jt|jdd|zdzd |d|jt|j|jd|zdz|jd|zdzd!|d\}}|r|||jd|zd"z<|jt|j|jd|zdz|jd|zdzd#|d\}}|r|||jd|zd$z<|jt|jd%d|zd&zd'|d!dS)(zc Fill dict with statistics by varied statistics about ruby/nodejs/python selectors zCan't get statistics about z interpretersN selector__statusrzCan't get status of z selectorr_versions_installedre_versions_enabledzCan't get list of z applicationsc"tSr`r)interpreter_appssrcrpz>CloudlinuxSummary._fill_selectors_statistics..s,--rbr_applications_amountr_used_applications_runningzCan't get default version of _default_version_max_applications_per_domainz*Can't get max applications per domain for z interpreter_max_applications_per_userz(Can't get max applications per user for _num_users_with_appsz0Can't get amount of users with applications for z interpeter_num_domains_with_appsz2Can't get amount of domains with applications for z8Can't get average amount of applications per domain for _average_applications_per_domainz6Can't get average amount of applications per user for _average_applications_per_userr _num_applications_by_interpreterz5Can't get amount of applications per each version of ) SELECTORSr~rrrYrrrrrPrQrrrbrTrirlrvrsrXr[rx)rselectorr#rydefault_version_of_selectoraverage_apps_per_domainaverage_apps_per_userrs @rc_fill_selectors_statisticsz,CloudlinuxSummary._fill_selectors_statisticss o o H*./*G*G/::EhEEE++ 'G'")FS h 6 BC FK h 6 BC O & &4h??h&2>EO:x::::4     O & &?ASU^__h&)>> '    O & &?ASU\]]h&)<< '    )-(E(E6AA_v h 69[ [\-1_-J-J3OK($:=S$STOK($:=S$ST `___ .. *G* s0<]r h 69Y YZ O & &QScddh&)KK____     Uo o rbcddg}t|d\}}}|dkrt|tj|}i}|d|d<d|dD}tD]#}||t |d |z<$|S) zA Get wizard status and list of installed modules z/usr/sbin/cloudlinux-wizardr(Trr wizard_statusc,i|]}|d|dS)rr(ra)rros rcrIz.s#```v&.&*:```rbrqwizard_module_)r-r#rrr7r NOT_SELECTED)rret_codestd_outstd_err parsed_jsonwizard_statisticsparsed_modulesros rc_get_wizard_statisticsz(CloudlinuxSummary._get_wizard_statistics s -h7%0%N%N%N"'7 q=='00 0j)) -8-I/*``U^I_```! d dF;I;M;MfVb;c;c .7 8 8  rbc|j|jd\}|jfddddtD]'|jfdddzd(dS) zX Fill dict with statistics by varied statistics about cloudlinux-wizard z,Can't get statistics about cloudlinux-wizardcdS)Nrra)rsrcrpz;CloudlinuxSummary._fill_wizard_statistics..)s %o6rbrrNrecdzS)Nrra)rorsrcrpz;CloudlinuxSummary._fill_wizard_statistics..0s)*:V*CDrbr)r~rrrr7)rrrors @@rc_fill_wizard_statisticsz)CloudlinuxSummary._fill_wizard_statisticss $<<  ' :    "" 6 6 6 6   #   "  F O & &DDDDD 6) '      rbct}g}|D],}|t||z }-|S)zH Returns list of implemented scripts in integration.ini )r;r'keys)rscriptssections rc$_get_implemented_integration_scriptsz6CloudlinuxSummary._get_implemented_integration_scripts6sL #$$ 4 4G tF7O002233 3GGrbcdgd}tjts|Sd|d<||d<|S)zh Checks integration script exists and if exists get list of implemented scripts F)integration_scripts_usedintegration_scripts_specifiedTrr)rrrr:rrs rc_get_integration_infoz'CloudlinuxSummary._get_integration_infoAsT /4VXYYw~~k** M-1)*262[2[2]2]./ rbcd}tj}t|j|z }t|j|z }||fS)zG Gets memory usage: total and used memory in megabytes i)psutilvirtual_memoryfloattotalused) bytes_in_mbmem mem_totalmem_useds rc_get_memory_usedz"CloudlinuxSummary._get_memory_usedMsH  #%%#)$${2 ??[0(""rbcHtj}d}d}ttjrot j|rPt|dd5}| }dddn #1swxYwY||fS)za Gets kernel info release and module version (starting from 7h) :return: z/sys/module/kmodlve/versionNrrr) platformreleaserrrnrrrrrr)kernel_releasekmodlve_version_filekmodlve_versionrs rc_get_kernel_infoz"CloudlinuxSummary._get_kernel_infoXs ")++< %gk 2 2 3rw~~FZ7[7[ 3*C'BBB 3a"#&&((.."2"2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3..s"'BBBc8ttS)zp Gets info about lve extensions usage Calculates amount of packages with lve extensions )rr@rarbrc#_get_lve_extensions_packages_amountz5CloudlinuxSummary._get_lve_extensions_packages_amountgs 355666rbc d}tj|sdSt|dd5}|}dddn #1swxYwYt t|S)zk Reads /proc/sys/fs/datacycle/enable in order to check datacycle enabled parameter z/proc/sys/fs/datacycle/enableFrrrN)rrrrrrrr)datacycle_filerr-s rc$_is_kernel_datacycle_enabled_in_filez6CloudlinuxSummary._is_kernel_datacycle_enabled_in_fileos 9w~~n-- 5 .# 8 8 8 $A6688>>##D $ $ $ $ $ $ $ $ $ $ $ $ $ $ $CIIs'A))A-0A-cd\}}tj|sdSt|dd5}|d}dddn #1swxYwY||vS)zR Checks if datacycle parameter was given for current boot )z /proc/cmdline datacycleFrrr N)rrrrrrsplit) cmdline_filerrr-s rc_is_datacycle_param_was_passedz0CloudlinuxSummary._is_datacycle_param_was_passed~s $@ jw~~l++ 5 ,g 6 6 6 /!6688>>##))#..D / / / / / / / / / / / / / / /T!!s:A??BBctj}d}|D]&}|ttj|z }'|S)z= Returns general amount of domains on server r)rrrr) cpusers_list domains_countrs rc_get_total_domains_amountz+CloudlinuxSummary._get_total_domains_amountsH }    : :D S!24!8!899 9MMrbct}tt|d}tt|d}|r|rdS|rdS|rdSdS)zi Returns is links traversal protection enabled on server (symlinks or hardlinks) zfs.protected_symlinks_createzfs.protected_hardlinks_createall symlinks_onlyhardlinks_onlyno)r"rrr)rsymlink_protection_enabledhardlink_protection_enableds rc%_is_link_traversal_protection_enabledz7CloudlinuxSummary._is_link_traversal_protection_enableds %)#fjj9W.X.X*Y*Y%Z%Z"&*3vzz:Y/Z/Z+[+[&\&\# % *E 5 % #"? & $##trbcd}d}d}tjdstjdr|Stjdr|S|S)Nisocldeployqcow2z/etc/cl-convert-savedz/var/log/cldeployz/etc/cloudlinux-qcow2-installr)rrrs rc_get_cl_installation_sourcez-CloudlinuxSummary._get_cl_installation_sourcesd 7>>1 2 2 bgnnEX6Y6Y O 7>>9 : : L rbcttjrgjjdddjjdddjfddddtd s#jtdd djtdd djtdd djj dd djj dddjfddddjfddddjfddddjfddddjfddddjjdddttjr jfdddd jt"dd!d"jt$dd#d$jjdd%d&dS)'Nrlve_extension_packages_amountrer!link_traversal_protection_enabledcdSr_ra kernel_infosrcrpz;CloudlinuxSummary._fill_system_statistics..s Arbinstalled_kmod_lve_versionTskip_jwt_checkcldiag_cron_check_enabled cpu_amounttesting_repository_enabled base_distrozCan't detect platform for CLOSsecureboot_statusz+Can't detect whether secure boot is enabledcdSrrarsrcrpz;CloudlinuxSummary._fill_system_statistics..s KNrbrcdS)Nrravendor_integration_infosrcrpz;CloudlinuxSummary._fill_system_statistics..s+,FGrbrcdS)Nrrarsrcrpz;CloudlinuxSummary._fill_system_statistics..s+,KLrbrrcdSrra memory_usagesrcrpz;CloudlinuxSummary._fill_system_statistics.. LOrbrmemory_total_mbcdSr_rarsrcrpz;CloudlinuxSummary._fill_system_statistics..rrbmemory_used_mb domains_totalcTpSr`)rrrsrcrpz;CloudlinuxSummary._fill_system_statistics.. s$BBDDmHkHkHmHmrbkernel_datacycle_usage_enabledz,Can't get kernel datacycle enabled parameter virt_typez!Can't get the virtualization typehostnamezCan't get the hostnamecloudlinux_installation_sourcezCan't get installation source)rrrrnr~rrrrr1rr+rrrrrr&r r)rrrrs`@@@rc_fill_system_statisticsz)CloudlinuxSummary._fill_system_statisticss++-- %gk 2 2  O & &8/ '    O & &:3 '    O & &&&&&, '   "666  O & &-+ '    ""9e\t"TTT "" #  ( #    ""4#5umMmnnn ""  #U,?An    "" " " " "E+; #   #'"<"<">"> "" G G G G  & #   "" L L L L  + #   ,,..  "" # # # #W.?T #    "" # # # #W.>D #    ""  *E?PT #    &gk 2 2  O & &nnnn0>     "" 5+/R    ""7E:?WXXX ""  ,  , +      rbcjfddddjtdddjtddd dS) Nc jptSr`rUNKNOWN_RHN_IDrsrcrpzKCloudlinuxSummary._fill_dict_with_rpm_packages_statistics.. DN4nrbrrCan't get system ID os_versionzCan't get version of OS rpm_stat_listrRz*Can't get info about client's rpm packages)r~rr$rPrs`rcrz9CloudlinuxSummary._fill_dict_with_rpm_packages_statistics s "" 4 4 4 4   !    "">5,Habbb "" !?J@l     rbparamcZtj|j|S)z Retrieve data from proc/mounts for param :return: param_value - Optional[int], if there is no value - None )r/ str_to_intrr)rr s rc_get_proc_paramz!CloudlinuxSummary._get_proc_param s# ()?)?@@@rbc Hdg}ttjr|gd|D]I}|jt |j|d|ddd|J|jtdddd S) z Filling stats about mounting - mount params from parameters list - separate hidepid getting, since it is more complicated than other mounting params zkernel.memcg_oom_disable) zfs.enforce_symlinksifownerzfs.symlinkown_gidzfs.protected_symlinks_allow_gidz fs.protected_hardlinks_allow_gidzfs.global_root_enablezfs.proc_can_see_other_uidzfs.proc_super_gidzfs.xfs.cap_res_quota_disablezubc.ubc_oom_disablezfs.process_symlinks_by_taskrrrz Can't get hidepidzCan't get hidepid valueN) rrrnrWr~rrr rrr parametersps rc_fill_proc_params_statisticsz.CloudlinuxSummary._fill_proc_params_statistics( s '  &gk 2 2            A O & &,a00 #s## Q       "" *   %      rbc d}|D]9}|jt|j|dd|d|d:dS)zJ Fill dict with statistics about kmodlve parameters usage )lve_setuid_enterrkmodlve_z Can't get "z" kmodlve parameter valueN)r~rr_get_kmodlve_param_valuers rc_fill_kmodlve_params_statisticsz1CloudlinuxSummary._fill_kmodlve_params_statisticsU sk+   A O & &5q991;q;;;       rbctd|jfdddd|jfdddd |jfd dd d |jfd ddd|jfdddd|jttddddS)zv Fill statistics fields from jwt token. - jwt token metrics (cl_plus existence and client_id) F)check_expirationc8dnddS)Ncl_plusrr-srcrpz=CloudlinuxSummary._fill_cln_jwt_information..j sDLDDdhhy$.G.GrbrrzCan't get cl_plus informationc8dnddS)N client_idrrsrcrpz=CloudlinuxSummary._fill_cln_jwt_information..p sDLDDdhh{D.I.Irbr zCan't get client_id valuec8dnddS)Nis_awp_premium_allowedrrsrcrpz=CloudlinuxSummary._fill_cln_jwt_information..v sDLDDdhh7OQU.V.Vrbjwt_is_awp_premium_allowedz&Can't get is_awp_premium_allowed valuec8dnddS)Nis_awp_cdn_allowedrrsrcrpz=CloudlinuxSummary._fill_cln_jwt_information..| sDLDDdhh7KT.R.Rrbjwt_is_awp_cdn_allowedz"Can't get is_awp_cdn_allowed valuec8dnddS)Nis_trialrrsrcrpz=CloudlinuxSummary._fill_cln_jwt_information.. sDLDDdhhz4.H.Hrbjwt_is_trial_licensez$Can't get jwt_is_trial_license valuelicense_activezCan't get license status valueN)r?r~rrrB)rr-s @rc_fill_cln_jwt_informationz+CloudlinuxSummary._fill_cln_jwt_informationb sD .uEEE "" G G G G   +    "" I I I I   '    "" V V V V  ( 4    "" R R R R  $ 0    "" H H H H  " 2     "" 0$ 7 7@PRr     rbcjfddddjtddddS) za Filling stats centralized management - centralized management existence cLtjjSr`)rrrCL_PLUS_CM_DISABLED_PATHrsrcrpzKCloudlinuxSummary._fill_centralized_management_statistics.. sBGNN4#@AArbrcentralized_management_disabledzCan't check CM disabling statusrcl_plus_sender_service_statusz)Can't check cl plus sender service statusN)r~rr>rs`rc'_fill_centralized_management_statisticsz9CloudlinuxSummary._fill_centralized_management_statistics sf "" A A A A  - -     "" %  + 7      rbc2i} t}|D]H}|D]1\}}|d|g|2In9#tt f$r%}t d|Yd}~nd}~wwxYw|S)a Prepare list of dicts with CPU metrics Method get_cpu_metrics returns data in following format: [ { "id": 0, "model": "QEMU Virtual CPU version 2.5+" }, { "id": 0, "model": "QEMU Virtual CPU version 2.5+" } ] This helper produces a dict, where each key - metric_name, value - list of values for all CPUs "cpu_model": [ "QEMU Virtual CPU version 2.5+", "QEMU Virtual CPU version 2.5+" ], "cpu_id": [ 0, 0 ] cpu_zCPU metrics getting error: %sN)rNr setdefaultrrrMrr)r cpu_corescpu_coremetricvalueexs rcmake_flat_cpu_metricsz'CloudlinuxSummary.make_flat_cpu_metrics s: B'))I% I I%-^^%5%5IIMFE%%oVoor::AA%HHHHI I& B B B   int_listrNz Can't parse z metric for all coresrmemoryzCan't parse memory metrics)r:r~rrrrO)r exp_metrics cpu_metricsr7 metric_types rc_fill_hardware_statisticsz+CloudlinuxSummary._fill_hardware_statistics sSRR 0022 !  F(.+(=(=**:K O & & 66)>&#'V%)(,'1 $$ -00@,A,A)),-()*&,-)+-CE^^ ^! ! ! ! == !sC C C"!C"c Dt}|dvrPtjtjdz }|d}d|d}nd}t j|ddd t jt j d }|j |j fS) z Scan /var/log/messages for all needed "Act like CageFS is disabled ..." messages for yesterday :return: Tuple (ret code, std_out string) )cl6cl6hrQ)daysz%Y-%m-%dz/usr/share/cloudlinux/logs-at z< /var/log/messages | /bin/grep 'Act like CageFS is disabled'za/usr/bin/journalctl --since yesterday --until today | /usr/bin/grep 'Act like CageFS is disabled'Tr6F)rr7r8rstderrr9) r$datetimedatetoday timedeltastrftimerCrDPIPEDEVNULLrTr)os_typeyesterday_date date_to_scans_cmdrs rcrSz$CloudlinuxSummary._get_data_from_log* s !"" o % %&]0022X5GQ5O5O5OON)22:>>LNNNN ExE N "?%   |QX%%rbcttjr"jjdddt jd<jttj dddd jj dd d jj dd d jj dddjfddddjfddddt!ttdtjd<n djd<dS)Nrold_way_of_integration_used*Can't detect old LVE integration mechanismlve_utils_versionF) verify_expr cl_editionzCan't get CloudLinux editionis_solo_meta_file_presentz$Can't detect solo meta file presenceis_admin_meta_file_presentz%Can't detect admin meta file presenceis_container_meta_file_presentz)Can't detect container meta file presencecjSr`rrsrcrpzACloudlinuxSummary._prepare_cl_normal_statistics..e D'rbr$Can't get or generate security tokenc jptSr`rrsrcrpzACloudlinuxSummary._prepare_cl_normal_statistics..k rrbrrrlvemanager_version)rrrnr~rrLVE_UTILS_PKG_VERSIONrrget_cl_edition_is_solo_marker_exists_is_admin_marker_exists_is_container_marker_existsLVEMANAGER_PKG_VERSIONLVEMANAGER_PKG_RELEASE_fill_dict_with_statisticsrs`rcrz/CloudlinuxSummary._prepare_cl_normal_statisticsK s %gk 2 2  O & &0-<     0E+, "" J-% @ @ @%Wu    ""  '0KMs    ""  (%1MOv    ""  ,  , 7    "" ' ' ' '   2     "" 4 4 4 4   !    " -2H2T7M4h4hPf4h4hDO0 1 148DO0 1 '')))))rbc d dd d d d}tj sdSGdd t fd } d d d i}d tj D}||D]/} |||#$rYt $r |D]}d ||<Y,wxYw| |j <| |j <| |j <tjdr d|j|<dStjdr d|j|<dSd|j|<dS)z Filling stats lvemanager - number of visits on X-Ray tab - number of X-Ray installation - number of LVEManager opens z/var/log/cloudlinux/iQlve_number_of_opensxray_number_of_installationxray_number_of_visitsxray_advanced_metrics_statusNceZdZdS)ECloudlinuxSummary._fill_lvemanager_statistics..BreakOuterLoopN)rs __module__ __qualname__rarbrcBreakOuterLoopr s Drbrctj} |z}t|dd5}d}|D]} d|ddd}tj|d}| z |cxkr|krnnd|ddd} | dkr| xxd z cc<n0| d kr|xxd z cc<n| d kr|xxd z cc<nd }#ttf$rYwxYw|r  ddddS#1swxYwYdS) NrrrFrrz%Y-%m-%d %H:%M:%S,%fzlvemanager-openedrQzxray-install-startedzxray-tab-clickedT) r_nowr%rrrstrptimerrAttributeError)statsfilecurrent_date_timestamp file_pathrbreak_outer_looplinelog_timelog_date_timestamprrCOLLECTING_PERIOD LOG_FOLDERLVE_NUMBER_OF_OPENSXRAY_NUMBER_OF_INSTALLSXRAY_NUMBER_OF_VISITSs rcfill_statisticszFCloudlinuxSummary._fill_lvemanager_statistics..fill_statistics s#%-%6%:%:%<%<%F%F%H%H ""T)Iiw777 )1#( !!D!#&88DJJsOOBQB,?#@#@-5->-G-GRh-i-i-s-s-u-u*14EEHZssss]ssssss&)hhtzz||/A/A#/F/Fqrr/J&K&KG&*=== %&9 : : :a ? : : : :!(,B!B!B %&= > > >! C > > > >!(,>!>!> %&; < < < A < < EE<E'#E<&E''E<<FFrc<g|]}tjd||S)z^lvemanager\.log(\.\d{1,2})?$)rematch)rrs rcrzACloudlinuxSummary._fill_lvemanager_statistics.. s+qqqdIiko@p@pqTqqqrbrkz./opt/alt/php-xray/php/advanced_metrics.enabledriz//opt/alt/php-xray/php/advanced_metrics.disabledrjnone) rrisdirrlistdirsortrr~r) rXRAY_ADVANCED_METRICS_STATUSrr~ log_fileslog_filer~rrrrrrs @@@@@@rc_fill_lvemanager_statisticsz-CloudlinuxSummary._fill_lvemanager_statisticsv s, %3"? 7'E$w}}Z((  F     Y    ) ) ) ) ) ) ) ) ) )0*1.CQH_abc rqbj&<&<qqq ! * *H * H5555!    * * *&**D')Jt$$** *2<U3V/0/9:M/N+, 7>>J K K C?R0S,---rbc~|jdddd|jdddddS) z: Fill dict with feature flags information c2dtDS)Ncg|] }|j Srar`rrs rcrzVCloudlinuxSummary._fill_feature_flags_statistics.... s777QV777rbr]rarbrcrpzBCloudlinuxSummary._fill_feature_flags_statistics.. s77_%6%6777rbrserver_flags_availablez3Can't get information about available feature flagsc2dtDS)Nc*g|]}|j |jSra)rirrs rcrzVCloudlinuxSummary._fill_feature_flags_statistics.... s!DDD!)DQVDDDrbr]rarbrcrpzBCloudlinuxSummary._fill_feature_flags_statistics.. sDD_%6%6DDDrbserver_flags_enabledz1Can't get information about enabled feature flagsN)r~rrs rc_fill_feature_flags_statisticsz0CloudlinuxSummary._fill_feature_flags_statistics sb "" 7 7  $ A    "" D D  " ?      rbcd}d}d}d}d}d}d}d}tj|r|}tj|r|}tj|r|}||j|<dS) z8 Fill out AccelerateWP promotion status accelerate_wp_promotion_statusenabled_for_current_serverenabled_for_all_serversskippedz,/var/lve/clflags/enable_awp_all_servers.flagz,/var/lve/clflags/enable_awp_this_server.flagz$/var/lve/clflags/skip_awp_setup.flagN)rrrr~) rFIELDENABLED_FOR_CURRENT_SERVERENABLED_FOR_ALL_SERVERSSKIPPEDenable_awp_all_servers_flagenable_awp_this_server_flagskip_awp_setupr(s rc(_fill_accelerate_wp_promotion_statisticsz:CloudlinuxSummary._fill_accelerate_wp_promotion_statistics s 1&B"";'U#&T#? 7>>5 6 6 -,F 7>>5 6 6 0/F 7>>. ) ) F!'rbcvjfddddjfddddtjd<t!ttd tjd <n djd <jjd d d dS)NcjSr`rtrsrcrpz7CloudlinuxSummary._prepare_statistics.. rurbrrrvc jptSr`rrsrcrpz7CloudlinuxSummary._prepare_statistics.. rrbrrrmrrxrrkrl)r~rryr~rrrrs`rc_prepare_statisticsz%CloudlinuxSummary._prepare_statistics s "" ' ' ' '   2     "" 4 4 4 4   !    0E+, ! -2H2T7M4h4hPf4h4hDO0 1 148DO0 1 ""  ,  ) 8    '')))))rbcRttjr|ttjr(||ttjr|ttj r(| | ttj r| ttjs2ttjsttjr|t%ds|ttjr|ttjr|||||||||| |!|"|#|$|%|&|'dS)NTr)(rrGOVERNORrCAGEFSrrLRESELLER_LIMITSr.rnrr PHP_SELECTORrT RUBY_SELECTORPYTHON_SELECTORNODEJS_SELECTORrrr1LSAPIrWIZARDr _fill_wpos_activation_statistics_fill_wpos_statisticsr+rrrrErr9rrrrrr_fill_apache2nginx_statisticsrs rcrz,CloudlinuxSummary._fill_dict_with_statistics s %g&6 7 7 3  0 0 2 2 2 %gn 5 5 8  ( ( * * *  5 5 7 7 7 %g&= > > .  + + - - - %gk 2 2 3  ( ( * * *  0 0 2 2 2 %g&: ; ; 1  . . 0 0 0 &w'< = = .)'*ABB .*'*ABB .  + + - - -!666 ;  8 8 : : : %gm 4 4 *  ' ' ) ) ) %gn 5 5 +  ( ( * * * --/// ""$$$ &&((( ++--- $$&&& ))+++ &&((( **,,, !!### ((***   """ ))+++ ##%%% ++--- 55777 **,,,,,rbcJ|j|jddddS)Nr apache2nginxz Can't parse Apache2Nginx metrics)r~rget_apache2nginx_statsrs rcrz/CloudlinuxSummary._fill_apache2nginx_statisticsJ s5 ""  '   .      rbc|jdddd|jtd\}|jfddd|rdnddS) NcJtjtSr`)rrrr!rarbrcrpzDCloudlinuxSummary._fill_wpos_activation_statistics..V sBGNN#BCCrbr.cmt_is_accelerate_wp_free_activation_completedz2Can't get statistic of AccelerateWP CMT activationz,Can't get AccelerateWP activation statisticsc.dS)Naccelerate_wp_free_activater)client_activationsrcrpzDCloudlinuxSummary._fill_wpos_activation_statistics..c s%))*GHHrb&cmt_accelerate_wp_free_activated_in_uiz;Can't get statistic of AccelerateWP CMT activation selected)r~rrr )rr#rs @rcrz2CloudlinuxSummary._fill_wpos_activation_statisticsR s "" C C  < @    &*_%B%B " :& & "" "" H H H H  4MT ^ I IZ^      rbcD  |j|jd\} |sdSt trW ddkr? d |j fdddd d  |j fd dd d|j fd d dd|j fdd dd dr |j fdd dd dD]- dkr |j fdd d zd. dgD]& |j fdd d zd' dD]- dkr |j fdd d zd. dgD]& |j fdd d zd' d!gD] |j fd"d d# zd d$} d%} |xr#|jfd&d d#|zd |x r#|j fd'd d#|zd dgD]- dkr |j fd(d d) zd. d*iD]\ }||jd+ z<|j fd,d d-d|j fd.d d/d|j fd0d d1d2|j fd3d d4d5|j fd6d7d8d9|j fd:d7d;d<|j fd=d7d>d?|j fd@d7dAdB dCx}r+|D]\}}||jdD|<dSdSdSdS)ENz!Can't get AccelerateWP statisticsrr#features_visible_by_defaultcdS)Nrra wpos_statssrcrpz9CloudlinuxSummary._fill_wpos_statistics..u J'DErbr wpos_features_visible_by_defaultz*Can't get statistic of using AccelerateWP.features_allowed_by_defaultcdS)Nrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics..| rrb wpos_features_allowed_by_defaultc ddS)N enabled_sitesrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics..  ?3G<rbrsites_count_with_enabled_wposc ddS)N allowed_usersrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbusers_count_with_allowed_wpos visible_usersc ddS)Nrrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. sJ7@rbusers_count_with_visible_wposrrc dS)Nrrarorsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. J7?rbsites_count_with_enabled_ enabled_usersc dS)Nrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbusers_count_with_enabled_rc dS)Nrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbusers_count_with_allowed_allowed_suitesc dS)Nrrasuitersrcrpz9CloudlinuxSummary._fill_wpos_statistics.. J'78?rbusers_count_with_allowed_suite_enabled_suitesc dS)Nrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbusers_count_with_enabled_suite_ _billable _non_billablecSr`ra)enabled_billablesrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 0rbcSr`ra)enabled_non_billablesrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 4rbc dS)Nrrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbusers_count_with_visible_ upgrade_urls upgrade_url_cdS)N4accelerate_wp_suite_enabled_premium_suite_disallowedrarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s #YZrbrcdS)N1accelerate_wp_suite_enabled_premium_suite_visiblerarsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s #VWrbrc.dS)Nis_accelerate_wp_flag_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics..  'FGGrbrz1Can't get statistic of AccelerateWP feature flag.c.dS)Nis_accelerate_wp_icon_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. rrbrz0Can't get statistic of AccelerateWP icon status.c.dS)N%is_smart_advice_notifications_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 'NOOrbrrzJCan't get statistic of AccelerateWP is_smart_advice_notifications_enabled.c.dS)N!is_smart_advice_reminders_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 'JKKrbrzFCan't get statistic of AccelerateWP is_smart_advice_reminders_enabled.c.dS)N+is_smart_advice_plugin_installation_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 'TUUrbr!zPCan't get statistic of AccelerateWP is_smart_advice_plugin_installation_enabled.c.dS)Nis_object_cache_banners_enabledrrsrcrpz9CloudlinuxSummary._fill_wpos_statistics.. s 'HIIrbr#zDCan't get statistic of AccelerateWP is_object_cache_banners_enabled.r awp_whmcs_) r~rget_wpos_statsrrrr format_metricr) rr#billable_suite_metricnon_billable_suite_metric upgrade_url whmcs_statskeyr8r rrorrs @@@@@rcrz'CloudlinuxSummary._fill_wpos_statisticsj s"o;;   /    F j$ ' 'a @JNN8,D,D ,Q,Q~~;<<H**EEEE6@  ~~;<<H**EEEE6@  O & &<<<</<     O & &<<<</<     ~~o.. **@@@@3@ %_5  W$$**?????/&8@  %.."==  **?????/&8@  %_5  W$$**?????/&8@  $(8"==  **?????5=@  $(8"==  **?????5=@ ,1(;(;(;%/4,C,C,C)'1~~6K'L'LL#O1100009>:S+T+TT'O1144449>))s$AB (BB c6|dS)z a wrapper method for the get_users_and_resellers_with_faults method. return the number of users with faults in the past 24 hours. rr0rs rcr[z(CloudlinuxSummary._get_users_with_faults;  7799!<> $## 3   rbc|dSd|zdzS)z/Convert memory limit from mempages to megabytesNrira)r8s rcrKz!CloudlinuxSummary._mempages_to_mbZ s =45yD  rbch|dStj||pd}|dSt|dz dS)z,Convert cpu and ncpu to percents of one coreNr)lncpugY@rQ)rSconvert_to_kernel_formatround)rIr5r7s rcrHz(CloudlinuxSummary._cpu_limit_to_percentsa sE ;423diaHHH =4UU]A&&&rb.c|jttd|jDt d}g}t |t dD]8\}}tt|}|||f9| d||_|jS)zC Return list of tuples [users_in_package, package] Nc32K|]}|jj|VdSr`)packager)rrs rcrz>CloudlinuxSummary.get_users_amount_per_plan..r s,ggdIZIfTIfIfIfIfggrbrG)r+T)reverse) rsortedr'rurtr rrrr)rr/users_sorted_by_packagerrGgroup num_userss rcget_users_amount_per_planz+CloudlinuxSummary.get_users_amount_per_plank s   '&,gg&6&<&C&C&E&Egggggy))''' # !O")*AzR[G\G\"]"]"] = =U ,, && 7';<<<<   . . .#2D ##rb number_of_topcb |||dz S#t$rYdSwxYwr_)rM IndexError)rrNr/s rcrz5CloudlinuxSummary._get_top_package_by_number_of_users sI 112BCCMTUDUV V   44 s  ..crt|\}}|s"|t||S)z% Parse CLI arguments )rRrr3)rrvr(r-s rcrmzCloudlinuxSummary._parse_args s>5T::  7  !5!5 6 6 6 rbr#rrr- exit_coderHc|tj|d}|||d<t|dtj|dS)z? Print data in default format for web and exit )rr%r-Nstatistic_enabledT)rr2r;r<)rr-rRrHrs rcr=z(CloudlinuxSummary._print_result_and_exit sP$$)++tLL  ++?G' ($''' rbrQrr/c|dtjit|dtj|dS)z Print error and exit :param dict message: Dictionary with keys "result" as string and optional "context" as dict r%TN)rrr2r;r<)rr/s rcrz!CloudlinuxSummary._error_and_exit sG  TY[[1222$''' rbctjdrHtjddgdtjtjd}t j|jSdS)zD Return mod_lsapi info from switch_mod_lsapi script rz--statTFrrr^r9N) rrrrCrDrdrrrrs rcrz$CloudlinuxSummary.get_raw_lsapi_info sg 7>>5 6 6 (,h7!! A:ah'' ' ( (rbcdd}tr|dz }tj|r{t j|dgdtjtjd}tj|j  d}d| D}|Sd S) zd Return wmt-api config if is_solo_edition True, run wpt-api-solo is command z-/usr/share/web-monitoring-tool/wmtbin/wmt-apiz-soloz --config-getTFrWrc4i|]\}}|t|Sra)r)rkrHs rcrIz9CloudlinuxSummary._get_wmt_api_config.. s$%[%[%[DAqaQ%[%[%[rbN) rrrrrCrDrdrrrrr)rrwmt_api_config_summarys rcrz%CloudlinuxSummary._get_wmt_api_config s B     w G 7>>' " " *.)Z_U_UdlqA&*Z%9%9%=%=h%G%G "%[%[>>rbc@tjdS)Nz/etc/cloudlinux-containerr^rarbrcr}z-CloudlinuxSummary._is_container_marker_exists sw~~9:::rbctjdr3tjddgddd}t j|jSdS)zL Return statistics from cloudlinux-ssa-manager get-stat API z /usr/sbin/cloudlinux-ssa-managerget-statTFrrr9NrrrrCrDrrrrXs rcr8zCloudlinuxSummary.get_ssa_stats s_ 7>>< = = (3Z@t\`hmA:ah'' '  ( (rbcd}d}d}d}tj|rhtj|rItj|}tj|}||z dkrd}d}t jt jkrmtj|rMd}d}tt||d d } tt||d d } | r| sd }nKd}nHtj|r)d } tt| |d d } | rd }nd}|d krd}||d} | S)z; Return statistics from Leapp upgrade logs rz /var/log/leapp/leapp-upgrade.logz/var/log/elevate-cpanel.logz/var/log/cldeploy.logi'rQzHAn upgrade inhibitor detected\|Workflow interrupted due to the FailPhasez'Starting stage After of phase FirstBootT)rONrz Great SUCCESS)rr) rrrgetmtimerrrrnextr')r leapp_logfileelevate_cpanel_logfilecldeploy_logfile leapp_mtimecldeploy_mtimeupgrade_status fail_grep_strfirst_boot_grep_str fail_grep_resfirst_boot_grep_ressuccess_grep_strgrep_res stat_results rcrz!CloudlinuxSummary.get_leapp_stats s : !>2 7>>- ( ( &RW^^??N^+.???$%!    !2 2 2w~~m,, ' k &P# $T-UY%Z%Z%Z\` a a &*40C]ae+f+f+fhl&m&m#&'}'%&NN%&Nw~~455 '#3 %57M\` a a acghh'%&NN%&N Q   ! '5L]^^ rbrcd}t||}|sdS|d}|dkrdS|dkrdSt d |d |d ) z Get kmodlve parameter value: -1 - not supported (parameter file doesn't exist); 0 - disabled; 1 - enabled z/sys/module/kmodlve/parametersrkrrYrQNrzUnable to interpret "z" kmodlve parameter value: "")r r read_textr RuntimeError)r params_dir param_file param_values rcrz*CloudlinuxSummary._get_kmodlve_param_value s6 *j11   "" 2 **G*<<BBDD #  1 #  1m:mm_jmmmnnnrbcd}tj|rFtj|dgddd}t j|jdSdS)E Return statistics from cl-smart-advice counters API z/usr/sbin/cl-smart-advicecountersTFrcr-N) rrrrCrDrrrrutilrs rcget_smart_advice_statsz(CloudlinuxSummary.get_smart_advice_stats3 sg + 7>>$   4j1TY^___A:ah''++F33 3 4 4rbc"ddd}tdsy|j|jd\}}|T |d|ddS#t$r5}t dt|||cYd}~Sd}~wwxYw|S) z= Construct dict with Smart Advice statistics N)smart_advice_totalsmart_advice_appliedT)skip_marker_checkz!Can't get Smart Advice statisticsrappliedzAUnexpected json response from server, field %s is missing in "%s")rr~rrrrrtr)rrr#sa_statsrs rcrz.CloudlinuxSummary._get_smart_advice_statistics= s)-dKK $d;;; " $ = =+3!! GX#"2:72C]efo]pqqq"""(([]`ab]c]cem"MMMMMM "  sA B *BB B c(i}tjdrtddd5}t j|}t ||d<t|}d|D}t ||d<t d|D|d <g|d <g|d <|D]}|d d kr9| d}|r!|d  |dG|d dkr8| d}|r!|d  |dtt|d |d <tt|d |d <t d|D|d<t d|D|d<t d|D|d<t d|D|d<dddn #1swxYwYtjdrStddd5}| |d<dddn #1swxYwY|S)zP Return statistics by parsing /var/lib/apache2nginx/server.json z!/var/lib/apache2nginx/server.jsonrrrtotal_websitesc<g|]}|d|S) proxy_reasonrrs rcrz.d s)HHH!%%2G2GH1HHHrbtotal_proxy_passc*g|]}|ddk|S)r directiverars rcrz.i s)8p8p8pqqQ_O`doOoOoOoOoOorbproxy_pass_due_directivefailing_directivesfailing_handlersrr proxy_detailsrc*g|]}|ddk|S)rtestrars rcrz.z s(3f3f3f!!NJ[_eJeJeAJeJeJerbproxy_pass_due_testc*g|]}|ddk|S)rforcedrars rcrz.| s(5j5j5jAAnL]aiLiLiaLiLiLirbproxy_pass_due_forcedc*g|]}|ddk|S)rrrars rcrz.~ s(6l6l6lQQ~M^bkMkMkqMkMkMkrbproxy_pass_due_handlerc*g|]}|ddk|S)rincludesrars rcrz. s)7n7n7naaP^N_cmNmNmNmNmNmrbproxy_pass_due_includesNz/var/lib/apache2nginx/staterz)rrrrrloadrr'rtrrrrr)rrr-websitesproxiedrfailing_directivefailing_handlers rcrz(CloudlinuxSummary.get_apache2nginx_statsU sE  7>>= > >% p93QQQ$ pUVy||+.d))&' ..IHhHHH,/LL()588p8pG8p8p8p4q4q01.0*+,.() QQA(K77,-EE/,B,B),S!"67>>q?QRRR>*i77*+%%*@*@*Q!"45<>7 8 8 23S7KKK 2q!"!1!1g 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 s$GHHH*JJ J cd}tj|r3tj|dgddd}t j|jSdS)rz/usr/bin/clwpos-adminrbTFrcNrdrs rcr%z CloudlinuxSummary.get_wpos_stats sd ' 7>>$   (z"# A :ah'' ' ( (rb)rlN)r#NrN)rQ)rsrrrr. itertoolscompressrrrrrrrrr@rr staticmethodrpropertyrrrrrrrrrrrrrrrrr rrrrFr]r`rr rhrDrurr rr?rrr~r>rrrrrrrrrrrrr.r5rOr\rrrrrrrrrrr rrrrrrrrr9rTrXr[r'rbrirlrrorqrsrvrxrPrrrrrrrrrrrrrrrrr rrr+r1r:rErLrKrSrrrrrrrrrrr-r0r[r$ classmethodrJrKrHtuplerMrrmobjecttypingNoReturnr=rrrr{r|r}r8rrrrrr%rarbrcrwrws<7" "$$$ ,E ,W-D E E ,E ,W-B C C ,E ,W-D E E IBKFKL###@@\@X3X 88\8@@\@\ -$----^ $ $X $         \  ;;\;@S@S@@@\@:   555($$\$@@@\LLL`\6   \  tCH~$\:+#+#+#Z4440 : :V : : : :\ : VS[8I PV ei nr    :  \ D  !!!!\!EEEE81 1 1 1 f\<\*(??\?"    B P# P P P P'x}''''hsm\;<;<;<; @Q> VZ> > > > @ >O TX    >X>OXTXXXXXv====K@K@K@K@Z   4 4 4 l   *<<<+c+T+++\+Pd4j$t*d3PS8n.T(UPPPPB:s3xS7I1J:::::.."%.<@cN. c5s## $....`$!#$!#$!$!$!$!LYtGG\G,<:<:<:<:|KCKCKCKCZ 7 7QT 7YabeYf 7 7 7\ 7 5s 5S 5U]^aUb 5 5 5\ 5\\#\\\\\ "t " " " "\ " "T "c " " "\ "  D  W    \   "d "s " " " " t    \  T c   \ &&RV&&&&ltlClTXY\T]lll\lst\ttttl!D!!!\!&2\   ##\# / /\ /77\7 $   \  "D " " "\ "s\3\ \] ] ] ~    AVA AAAA+ + + Z   ( ( ( T   *$4$$$\$L   @lll 0!E#sC->\>??\?;;\;(8D>(((\(6T666\6poSoSooo\o&4HTN444\4d01HTN111\1f (HTN ( ( (\ ( ( (rbrwcTt}|j|Sr`)r9r link_xml_node)rs rcrr s$ XXF O!!### Mrb)r_rrrrqrrrrrrrCr;rr collectionsrr functoolsrrrmultiprocessingroperatorr pathlibr socketr r r rrrrrr cldetectlibrrSrrcl_proc_hidepidrclcommonrclcommon.clwpos_librrrclcommon.constrclcommon.cpapirr clcommon.librclcommon.lib.cleditionrrrclcommon.lib.cmt_utilsr clcommon.lib.constsr!clcommon.sysctlr"clcommon.utilsr#r$r%r&r'r(r)r*r+r,r-clconfigr.r/r0 cldiaglibr1 cli_utilsr2r3cllimitslib_v2r4r5 clveconfigr6clwizard.modulesr7 lve_utilsr8rylveapir9vendors_api.configr:r;clsummary.utilsr<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLclsummary.hardware_statisticsrMrNrO!clsummary.rpm_packages_statisticsrP arg_parserRstoragerSclselect.clselectctlrTclselect.clselectstatisticsrUrVrWrXrYrZclselector.selectorlibr[ lvemanagerr\rr~ ImportErrorclflagsr^rrrrrrQrrrrrrrrrurwrrarbrcrs    ,,,,,,,,((((((((%%%%%%LLLLLLLLLLLLLLLLLLLL :::::: #"""""IIIIIIII&&&&&& :99999??????&&&&&&                          ONNNNNNNNN3333336666666666666666######((((((::::::========& DCCCCC444444######"888888=<<<<<@@@@@@@@@@@@@ " " "221-110 !! "''''''' - W 3 4 4    #   UUUUUUu3(u3(u3(u3(u3(u3(u3(u3(pgs$2(FF76F7;GG  G