English| 简体中文
The Performance Node application is a web-based tool accessible via any computer or mobile device's browser regardless of brand. To set up and use the application:
-
Installation Install required packages, primarily Flask and psutil, using the following command:
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
-
Running the Application Execute the
app.pyfile with:python3 app.py
-
Accessing the Application By default, the application listens on port 7999 within the same local network; access it via:
http://192.168.xxx.xxx:7999 -
Command Line Arguments Users can manually specify parameters when running the application:
python3 app.py --device 1 --port 6666 --debug 1 --log 1
options:
-h, --help show this help message and exit
--device DEVICE 0: RDK X3 (Module), 1: RDK Ultra, 2: RDK X5, 3: RDK S100
--port PORT enter the port you like.
--debug DEBUG Flask Debug Mode, 0:false, 1:true.
--log LOG Flask log, 0:false, 1:true.-
Data Collection
-
CPU Data: The CPU usage percentages for each logical processor are obtained using
psutil.cpu_percent(percpu=True). A list of float values is returned, with each entry corresponding to the utilization of a specific CPU core, maintaining the same order across calls even when invoked from different threads. -
BPU Data: BPU utilization data comes from files specific to the devices:
- For RDK X3, RDK X3 Module, and RDK Ultra:
/sys/devices/system/bpu/bpu0/ratioand/sys/devices/system/bpu/bpu1/ratio. - For RDK S100:
/sys/devices/system/bpu/bpu0/ratio.
- For RDK X3, RDK X3 Module, and RDK Ultra:
-
GPU Data:GPU utilization data comes from files specific to the devices:
- For RDK X5:
/sys/kernel/debug/gc/load
- For RDK X5:
-
Memory Data: Memory usage stats are gathered through
psutil.virtual_memory(), returning a named tuple with details such asavailablememory, which is the amount immediately allocatable to processes without swapping, andusedmemory, which is calculated differently across platforms and intended for informational purposes. -
Temperature Data: Temperature readings come from different paths for each device:
- RDK X3, RDK X3 Module:
/sys/class/hwmon/hwmon0/temp1_input - RDK X5 :
DDR:/sys/class/hwmon/hwmon0/temp1_input
BPU:/sys/class/hwmon/hwmon0/temp2_input
CPU:/sys/class/hwmon/hwmon0/temp3_input - RDK Ultra:
/sys/devices/virtual/thermal/thermal_zone8/temp(among others)
- RDK X3, RDK X3 Module:
-
Frequency Data:
- RDK X3, RDK X3 Module, RDK X5read frequency data from one file:
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq. - RDK Ultra doesn't collect this data due to its impact on system load.
- RDK X3, RDK X3 Module, RDK X5read frequency data from one file:
-
Disk Usage Data: Disk usage statistics are retrieved with
psutil.disk_usage(), providing information about total capacity, used space, free space, and usage percentage for a specified directory. Theusedfield indicates total used space whilefreerepresents available space for regular users.
-
-
Performance Mode Settings Performance modes can be changed by sending commands to the command line via
os.system():- For RDK X3 and RDK X3 Module, setting the CPU governor to 'performance' mode involves echoing the word 'performance' to a specific file.
- For RDK X5, setting the CPU governor to 'performance' mode involves echoing the word 'performance' to a specific file.
- For RDK Ultra, similar commands are run for all eight CPU policies.
The application includes various power/performance modes such as 'performance' (highest frequency), 'powersave' (lowest frequency), and 'schedutil' (Linux 4.7+ strategy adjusting frequency based on scheduler-provided CPU utilization info).
Users encountering issues can submit issues or pull requests. There's also a satisfaction survey for the Performance Node, displayed as an image link.


