Repository navigation
Sensor Sources
- Per country: Our World in Data, Carbon intensity of electricity, 2022.
- World average: International Energy Agency, Emissions - Electricity 2025 - Analysis, 2025.
These sources provide the carbon intensity used to convert electricity consumption into estimated CO2 emissions. The country-level value is used when a country is selected; the IEA value is used for the world average.
- Per country: Global Petrol Prices, Household electricity prices around the world, 2026.
The source provides household electricity prices in US dollars. When the data is fetched, the corresponding exchange rate is calculated to display the price in the each country's local currency.
D. Al Kez, A. M. Foley, D. Laverty, D. F. Del Rio, and B. Sovacool, "Exploring the sustainability challenges facing digitalization and internet data centers", Journal of Cleaner Production, vol. 371, no. 371, p. 133633, 2022.
This source supports the estimate that internet usage generates indirect emissions from network infrastructure and remote servers (28-63 g CO2/GB). These emissions are presented as context and are not included in WattSeal's direct measurements.
- N. Six, "What's the carbon footprint of a computer?", Le Monde, Apr. 30, 2023. Supports the estimate of approximately 250-500 kg CO2eq in one-time manufacturing and transport emissions, with additional impact from gaming PCs, monitors, and peripherals.
- M. Yañez-Barnuevo, "Data Centers and Water Consumption", EESI, Jun. 25, 2025. Supports the estimate of approximately 1.9 L/kWh of water consumption for data-center cooling, alongside water use in mineral extraction.
These sources provide context for the wider environmental footprint of digital equipment. They are not included in WattSeal's electricity-use measurements.
The sources of the metrics collected and estimated by WattSeal for every sensor and OS:
Windows
- Library: msr-driver-rs (custom Rust wrapper for the Scaphandre and WinRing0 drivers).
- Driver: WinRing0 RAPL Driver (requires admin rights for installation and start).
- Source: Model-Specific Registers (MSR).
- Intel: Reads MSR_PKG_ENERGY_STATUS (0x611), MSR_PP0_ENERGY_STATUS (0x639), MSR_PP1_ENERGY_STATUS (0x641), and MSR_DRAM_ENERGY_STATUS (0x618) (Intel 64 and IA-32 Architectures Software Developer’s Manual, Volume 3B, Section 14.9).
- AMD: Reads ENERGY_PKG_MSR (0xC001029B) and ENERGY_CORE_MSR (0xC001029A) (AMD E-SMI Documentation).
- Energy counter conversion:
- The MSR energy registers return a raw counter value (64-bit from EDX:EAX with only 32 bits used).
- Read the energy unit from MSR_RAPL_POWER_UNIT (Intel) or ENERGY_PWR_UNIT_MSR (AMD):
energy_unit = 1 / 2^energy_unit_rawwhereenergy_unit_rawis bits 8-12 of the MSR (Intel manual chapter 14.9.1). - Convert the raw counter to energy:
energy_joules = raw_energy_counter * energy_unit. - The measurement uses two samples and takes the difference:
delta_energy_joules = energy_joules_current - energy_joules_previous.
- Calculation:
- The energy is extracted per RAPL domain (pkg, pp0, pp1, dram) by reading:
- Intel: MSR_PKG_ENERGY_STATUS, MSR_PP0_ENERGY_STATUS, MSR_PP1_ENERGY_STATUS, MSR_DRAM_ENERGY_STATUS.
- AMD: ENERGY_PKG_MSR, ENERGY_CORE_MSR.
- The energy is extracted per RAPL domain (pkg, pp0, pp1, dram) by reading:
Linux
- Library: Standard file system access (needs sudo).
- Source: Linux Kernel powercap framework documentation.
- Path: /sys/class/powercap/intel-rapl:0/energy_uj.
- Calculation: Directly reads microjoules (
$\mu J$ ) from the sysfs interface and calculates the power over the measurement interval.
Fallback (OS without RAPL support or insufficient permissions, currently always on macOS)
- Library: sysinfo (for CPU usage).
- Source: Hardcoded TDP (Thermal Design Power) lookup table in estimation.rs.
- Calculation: Non-linear power estimation
$P = P_{idle} + (P_{peak} - P_{idle}) \times \text{usage}^{1.6}$ where usage is the percentage of CPU utilization,$P_{idle}$ is assumed to be 20% and$P_{peak}$ 125% of TDP (coefficients based on measurements on laptops and non-linear model from a Google article on server power estimation).
NVIDIA (Windows & Linux)
- Library: nvml-wrapper.
- Source: NVIDIA Management Library (NVML).
- Metrics: Energy delta in millijoules (mJ), GPU utilization, and Memory (VRAM) utilization.
AMD (Windows only)
- Library: adlx.
- Source: AMD Display Library X (ADLX).
- Metrics: Accesses the "Performance Monitoring Services" to retrieve real-time power (mW) and usage statistics.
Intel (Windows only)
- Library: Win32 Performance Data Helper (PDH).
- Source: Windows Performance Counter: \GPU Engine(*)\Utilization Percentage. Power consumption comes from PP1.
Fallback (when vendor telemetry doesn't provide power/energy)
- Library: nvml-wrapper (NVIDIA), adlx (AMD), PDH (Intel) for usage.
- Source: GPU utilization percentage.
- Calculation: Non-linear power estimation
$P = P_{idle} + (P_{peak} - P_{idle}) \times \text{usage}^{1.6}$ where usage is the percentage of GPU utilization,$P_{idle}$ is assumed to be 10% and$P_{peak}$ 100% of TDP (coefficients based on measurements on laptops and non-linear model from a An Integrated GPU Power and Performance Model).
- Library: sysinfo.
- Power Estimation: Fixed at a constant 5W for the entire memory bank, should be per-stick constant or DRAM (Scaphandre doc).
- Library: sysinfo, real read/written bytes during the sampling period.
- Source: Disk I/O throughput counters.
- Power Estimation:
- SSD:
$0.05W (\text{idle}) + (\text{Throughput MB/s} \times 0.015)$ - HDD:
$3.00W (\text{idle}) + (\text{Throughput MB/s} \times 0.035)$ - Unknown:
$0.30W (\text{idle}) + (\text{Throughput MB/s} \times 0.02)$ Based on throughput and disk type (SSD vs HDD), arbitrary coefficients, should be refined, A Comparative Study of HDD and SSD RAIDs' Impact on Server Energy Consumption
- SSD:
- Library: sysinfo, real sent/received bytes during the sampling period.
- Source: Network interface throughput counters.
- Power Estimation:
- Formula:
$0.2W (\text{idle}) + (\text{Throughput MB/s} \times 0.01)$ Capped at 3W per interface, should be refined with more data and sources, the CPU (already measured) accounts for the vast majority of the consumption under network load for packet processing: Understanding Power Efficiency of TCP/IP Packet Processing over 10GbE.
- Formula:
- Library: sysinfo (for per-process CPU/RAM/Disk usage).
- Logic:
- CPU Share:
$\frac{\text{Process CPU Usage}}{\text{Total CPU Usage}} \times \text{Total CPU Power}$ . - GPU Share:
$\frac{\text{Process GPU Usage}}{\text{Total GPU Usage}} \times \text{Total GPU Power}$ . - Final Attribution: The process power is the sum of its attributed compute power (CPU + GPU), weighted against the total system power. Custom calculation to encourage responsible usage: if only one process is using the CPU and GPU, it is attributed 100% of the power consumption.
- CPU Share: