This repository contains scripts and tools for extracting CPU/RAM and power consumption while a processing task is being carried. The selected processing task is a video streaming transmission (making use of ffmpeg open source tool), although any other app could be executed, and the CPU/RAM & power consumption extraction should work without being affected. For the power consumption extraction in specific, a smart plug (Shelly Plug S) is being used. Such device sends the consumption periodically via MQTT, which could be extracted using the monitor_power_consumption script.
Such repository is under the context of the EU-funded XGAIN Project. In specific, such work is under the umbrella of the dry-run lab testing actitivies for a Use Case (UC) where drones provide edge-based streaming services over 5G.
.
├── README.md
├── results
│ ├── cpu_ram
│ │ ├── cpu_ram_histogram.example.png
│ │ └── cpu_ram_histogram.example.log
│ ├── power_consumption
│ │ ├── power_consumption.example.png
│ │ └── power_consumption.example.log
└── scripts
├── generate_plot_power_consumption.sh
├── generate_plots_cpu_ram.sh
├── install_dependencies.sh
├── monitor_cpu_ram.sh
├── monitor_power_consumption.sh
├── plot_cpu_ram.py
├── plot_power_consumption.py
├── run_experiment.sh
└── start_streaming.sh
-
Install Dependencies:
cd scripts ./install_dependencies.sh
-
Activate the Virtual Environment:
source venv/bin/activate
-
Deactivate the Virtual Environment:
deactivate
- Run the Experiment:
./run_experiment.sh
-
Start the Streaming:
./start_streaming.sh
-
Monitor CPU and RAM Usage:
./monitor_cpu_ram.sh
-
Monitor Power Consumption:
./monitor_power_consumption.sh
-
Generate CPU and RAM Usage Plots:
./generate_plots_cpu_ram.sh
-
Generate Power Consumption Plot:
./generate_plot_power_consumption.sh
- For the power consumption KPI, configure the MQTT parameters in the
monitor_power_consumption.sh
script. - For the streaming app, adjust the configuration parameters in the
start_streaming.sh
script as needed.