HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/plogical/__pycache__/getSystemInformation.cpython-310.pyc
o

��h&�@sTddlZddlZddlZddlZddlZGdd�d�Zdd�Zedkr(e�dSdS)�Nc@s�eZdZej��ZdZedd��Zedd��Zedd��Z	edd	��Z
ed
d��Zedd
��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��ZdS)�SystemInformation�cCst��S)N)�os�
getloadavg�rr�3/usr/local/CyberCP/plogical/getSystemInformation.py�cpuLoadszSystemInformation.cpuLoadcCsFt��}|�d�}d}d}|D]}|dkr|}|S|dkr d}q|S)N�-rr��with)�platform�split)�OSName�data�checker�finalOSName�itemsrrr�	getOSNames
��zSystemInformation.getOSNamecC�tj�d�S)Nz%I:%M�r�now�strftimerrrr�getCurrentSystemTime#�z&SystemInformation.getCurrentSystemTimecCr)Nz%arrrrr�currentWeekDay'rz SystemInformation.currentWeekDaycCr)Nz%Brrrrr�currentMonth+rzSystemInformation.currentMonthcCr)Nz%Yrrrrr�currentYear/rzSystemInformation.currentYearcCr)Nz%drrrrr�
currentDay3rzSystemInformation.currentDaycCsvt��}t��}t��}t��}t��}t��}t��}t|�}|d}|d}|d}	||||||||||	d�
}
|
S)Nrr
�)
�weekDayNameInString�currentMonthName�currentDayInDecimalrr�loadAVG�currentTime�one�two�three)	rrrrrrrr�list)r�loadAverager#rr r!rr$r%r&rrrr�
getAllInfo7s 
�zSystemInformation.getAllInfocCsBz�ddl}tt�|��d��}tt�|����}tt�|�d�d��}|��}t|��jd�}t|�d�jd�}t|�d�j	d�}t|�
��}ttj���
��}	|	|}
|
d}|
dd}|
dd	}
|dkry|�d
|�d|
�d�}n|�d|
�d�}||||||||d
�}|WSddddddddd
�}|YS)Nrr�/��i@i�Qi�<zD, zH, �M)�ramUsage�cpuUsage�	diskUsage�cpuCores�
ramTotalMB�diskTotalGB�
diskFreeGB�uptimezN/A)�psutil�int�math�floor�virtual_memory�cpu_percent�
disk_usage�	cpu_count�total�free�	boot_time�datetimer�	timestamp)r7�ram_percentr<�disk_percent�	cpu_cores�ram_total_mb�
disk_total_gb�disk_free_gb�uptime_seconds�current_time�uptime_diff�days�hours�minutes�
uptime_str�
SystemInforrr�getSystemInformationLsN�
�z&SystemInformation.getSystemInformationcCshz'ddl}tt�|��d��tt�|����tt�|�d�d��d�}W|Sdddd�}Y|S)Nrrr*r+)r/r0r1)r7r8r9r:r;r<r=)r7rQrrr�
cpuRamDisk�s���zSystemInformation.cpuRamDiskcCsNddl}|�d�jd}|�d�jd}|�d�jd}|�d�j}|||fS)Nrr*r,)r7r=r?�usedr@�percent)r7�
total_disk�	used_disk�	free_disk�percent_usedrrr�GetRemainingDiskUsageInMBs�s
z,SystemInformation.GetRemainingDiskUsageInMBscCstdd���t_dS)Nz/tmp/lshttpd/.rtreport�r)�open�	readlinesr�	olsReportrrrr�populateOLSReport�sz#SystemInformation.populateOLSReportN)�__name__�
__module__�__qualname__rBrr^�staticmethodrrrrrrrr)rRrSrZr_rrrrrs6









3


rcCs<tjdd�}|jddd�|��}|jdkrt��dSdS)NzCyberPanel Installer)�description�functionzSpecific a function to call!)�helpr_)�argparse�ArgumentParser�add_argument�
parse_argsrerr_)�parser�argsrrr�main�s
�rm�__main__)rrrBr9rgrrmr`rrrr�<module>s
�