Skip to content

Nkeramov/raspberry_pi_system_info

Repository files navigation

Raspberry Pi System Info

Raspberry Pi Python Checked with mypy license

This project is a simple web server that displays system information about your Raspberry Pi.

The information includes generic board info, CPU details (model, architecture, number of cores, frequency, voltage, temperature, usage), RAM (total, used, free, cache, available), network interfaces (ip, mac), mounted disks and processes running in the system.

Some information is parsed from the device's revision code located in /proc/cpuinfo.

Information about disks and processes is presented in the form of tables. You can sort the tables by clicking on the column in the header.

The web server is based on Flask framework. By default the application will run on port 8080. It can be changed in env file.

Gunicorn is used to launch.

Setting up and running the project

Clone repository:

git clone https://github.com/Nkeramov/raspberry_pi_system_info.git

Switch to repo directory

cd raspberry_pi_system_info

Сreate new virtual environment:

python -m venv .venv 

Activate the virtual environment with the command:

source .venv/bin/activate

Install dependencies from the requirements file:

pip install -r requirements.txt

Run with command:

gunicorn --bind 0.0.0.0:8080 main:app

Or use a launch script run.sh, making it executable first

chmod +x run.sh

Configuration

The configuration file is located in the .env file. You can copy the env.example to .env and make your edits.

cp env.example .env

Adding to startup

You can set up automatic script launch at system startup.

Open the /etc/rc.local file in editor:

sudo nano /etc/rc.local

Add to the end of file this line:

/home/pi/raspberry_pi_system_info/run.sh &

Press Ctrl+O → Enter → Ctrl+X to save and exit.

Contributing

If you want to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push to your fork and create a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Ref

About

Web server with detailed information about Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published