How to stress test Raspberry Pi 4 in Windows 11

Configurare noua (How To)

Situatie

On the Windows platform, Raspberry stress tests can be performed using various methods. However, the most convenient one involves performing the same by accessing the Raspberry Terminal application through a Windows Subsystem for Linux (WSL).

1] Updating and installing the necessary applications

In Raspberry Pi 4, software applications are generally installed, updated, or removed using the Advanced Packaging Tool (APT). Before installing the application on the system, the package list needs to be updated to ensure the latest resources are being used.

Run the following command after opening the Raspberry terminal application:

sudo apt – get update

Sudo, or (Super User Do) is a command-line utility in Linux that allows users to run commands with super-user or administrative privileges by providing access to the root directory of the OS.

Once the APT is updated, let’s install the prerequisite software for the Stressberry applications in time.

Install Atlas:

Atlas is a library that helps Stressberry communicate with the sensors on Pi. It helps Stressberry communicate with the system hardware to execute instructions and collect the data it needs from the censors.

To install, the below-mentioned command can be entered in the terminal prompt:

sudo apt-get install libatlas-base-dev

Here is the meaning of all the options in the above command:

sudo: command to gain administrative or super-user privileges

apt-get install: Install a particular application package using APT.

libatlas: Library or package containing the programming functions or utilities of the Atlas application.

base: Core version of the library

dev: acronym of development

Instal Cairo:

To publish the stress test results, Stressberry depends on another application, Cairo, which provides graphics libraries to represent the test results visually.

sudo pip3 install cairocffi

pip3: is the package installer for Python 3, and

cairocffi: Python package for the Cairo Graphics Library, ensuring the installation of libraries and dependencies of the Cairo package in the Python 3 environment.

Install PyQt5:

To create the visual interface, Stressberry relies on the application PyQt5. Hence, installing it before Stressberry ensures that the tools needed for Stressberry’s visual interface are in place.

sudo apt-get install python3 -pyqt5

python3: Specifies the version of Python for which the package needs to be installed.

pyqt5: Libraries for creating desktop applications with a graphic user interface (GUI).

Read: How to update WSL Kernel on Windows

2] Install Stressberry

After installing all the prerequisites, Stressberry can then be installed by typing the below-mentioned command on the terminal

sudo apt install stress

followed by

sudo –H pip3 install –U stressberry

The first command installs the stress package on the system. Once installed, stress can be used as a command to impose the system’s load for the stress test.

The second command installs or upgrades the Python package Stressberry, wherein

-H: Ensures that the super user’s home directory is used for executing the command to avoid any potential permission issues for the generated files or changes in configuration as a result of installing the said package.

-U: Make sure that the latest version of the Stressberry is installed or upgraded in case any older version is already installed on the system.

Read: How to set up a Raspberry Pi module with default settings

3] Stress-tests execution

After completing the installation process, Stressberry can be started up through the below-mentioned command,

sudo stressberry –run out.dat

While running the application, this command records the CPU temperature and stores it in the file named out.dat, in the home directory.

Read: Best Raspberry PI4 ideas for Science Project

4] Record and display results

The program initially runs the CPU with minimum load to cool it down and then idles it for a while before stressing it with maximum load. After running it with a maximum load of about 5 minutes, the program releases the load and records the cool down.

The results of the test are recorded in the file out.dat. However, the results can also be published through a graph using the following command

sudo stressberry  -plot out.dat

Solutie

Tip solutie

Permanent

Voteaza

(4 din 9 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?