GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - green-kernel/django-admin-plugin: A plugin for django admin

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
sustainability
sustainability
 
 
sustainability_django
sustainability_django
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Screenshot.png
Screenshot.png
 
 
docker-compose.yml
docker-compose.yml
 
 
entrypoint.sh
entrypoint.sh
 
 
manage.py
manage.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Django Sustainability Monitor

A Django admin extension that visualizes the energy consumption of your Django application in real time. It reads data from the procpower kernel extension (/proc/energy/cgroup) and displays it in a live chart (1-second interval) directly inside the Django admin interface.

Screenshot of Django Sustainability Monitor

✨ Features

  • Adds a Sustainability page in the Django admin area
  • Reads energy usage per PID from /proc/energy/cgroup (via procpower)
  • Displays a real-time line chart using Chart.js
  • Shows tabular readings sorted by current energy use
  • Includes raw /proc/energy/cgroup output for debugging
  • Keeps data fully inside the Docker container — no sensitive host data is leaked

⚡ Requirements

  • Linux host with procpower installed and /proc/energy/cgroup available
  • Docker & Docker Compose
  • Django (tested with Django ≥ 4.2, but should work with 3.2+)

🔎 Limitations

Due to the way Linux and Docker work, we can only show the energy usage of the container the Django app is running in. It is technically not possible to display the resource consumption of other processes.

If you are running your database in another container or on a separate host, you will need to install a logger inside this container. This is straightforward, as you can simply read the cgroup file available within the container.

🚀 Quick Start (Docker Compose)

Clone this repository and run Django with the sustainability monitor:

git clone https://github.com/your-org/django-sustainability-monitor.git
cd django-sustainability-monitor

docker compose up

Then you can access the demo under http://localhost:8000/admin/sustainability/monitor/

About

A plugin for django admin

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.