Skip to content

green-kernel/wordpress-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WP Sustainability Monitor

A WordPress admin plugin that visualizes the energy consumption of your WordPress installation 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 in the WordPress dashboard.

Screenshot of WP Sustainability Monitor

✨ Features

  • Adds a Sustainability menu entry in the WordPress 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
  • WordPress (containerized in this setup)

πŸ”Ž Limitations

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

If you are running your database somewhere else, 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 WordPress with the plugin:

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

docker compose up

Then you can access the demo under http://localhost:8080/

About

A wordpress plugin that shows you the energy usage of your deployment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages