| December 12, 2011 11:00 PM PST | |
Monitoring Processor Energy Usage with Intel® Power Gadget 2.0
Download Intel® Power Gadget 2.0 now!
32-bit Intel® Power Gadget 2.0 (Windows)
64-bit Intel® Power Gadget 2.0 (Windows)
Intel® Power Gadget 2.0 for Mac
Introduction
Intel® Power Gadget 2.0 is a software-based power estimation tool enabled for 2nd Generation Intel® Core™ processors. It includes a Microsoft Windows* sidebar gadget, driver, and libraries to monitor and estimate real-time processor package power information in watts using the energy counters in the processor. With this release, we are providing functionality to evaluate power information on various platforms including desktops/notebooks and servers.
Background
Traditional methods to estimate power/energy usage of the processor has always been a cumbersome task that included special purpose tools or instrumentation on the motherboard along with third party equipment. Intel had earlier released Intel® Power Gadget 1.0 that included estimation of processor power via energy counters available in 2nd Generation Intel® CoreTM processor family. The motivation for the gadget was to assist end-users, ISV's, OEM's, developers, etc in more precise estimation of power from a software level without any H/W instrumentation.
New Features
With the current release, we are providing additional functionalities that include estimation of power on multi-socket systems as well as externally callable APIs to extract power information within sections of code. The multi-socket support essentially evaluates the Energy MSR on a per-socket basis and provides an estimate of power draw per socket. The API layer is a set of libraries and dlls that can be called via C/C#/C++ or via JavaScript and offers the flexibility to build the tool within code sections of an application. A blog on accessing Intel® Power Gadget 2.0 libary in C++ provides more details. Latest release also include a signed driver that eliminates the need to disable driver signing on 64-bit OS (previous version needed driver signing disablement during boot).
Brief Description
Intel® Power Gadget 2.0 consist of the following components
- Set of driver and libraries which access and post process the processor energy counter to calculate the power usage in watts and processor frequency (default install directory will be ~\Program Files\Intel\Power Gadget 2.0 for 64-bit OS)
- EzPwrLibrary.dll is the energy library which has the power API's
- daq_driver.dll is an interface to Intel® Energy Checker, which is installed in the same directory
- PwrLogSample.exe is a console application that logs power and frequency data via Windows command (alternative if you don't use the Windows* sidebar gadget). Open command prompt as an administrator, usage: PwrLogSample.exe <duration in seconds> <log_filename.csv>
- The Windows® 7 Sidebar gadget component which is automatically installed (except for server OS). Below is a screenshot of the tool UI and settings for logging power usage.
System Requirements (Windows)
- Windows 7* 32-bit and 64-bit
- Windows* Server 2008, Windows* Server 2008 RC2 (64-bit server platforms)
- Microsoft* .Net Framework 4
- Microsoft Visual C++ 2010 SP1 Redistributable package (x86 or x64 depends on OS)
- 2nd Generation Intel® CoreTM Processor, previous processors not supported
- Single socket
- Multi-socket
Installation/Setup
1. Download the appropriate 32 or 64-bit package and copy to your test system
2. Run setup.exe as an administrator. Accept the UAC, if one appears
3. Follow the installer prompt instructions to complete installation
- Microsoft* .Net Framework 4 (will automatically be downloaded from Microsoft* site if not yet installed in your system)
- Microsoft Visual C++ 2010 SP1 Redistributable Package (will automatically get installed if not yet installed)
- You will encounter a pop-up window warning about the gadget (please ignore)
Usages
Some usages of the Intel® Power Gadget 2.0. The Windows® 7 Sidebar gadget component installed on client OS (Windows® 7) monitor processor power usage when running a workload, or utilizing the daq_driver.dll (included when you install the tool) which is an interface to Intel® Energy Checker SDK, using the power API's in the energy library to get similar power estimation feature in an application, and many more.
Common use of Intel® Power Gadget is via Windows® 7 sidebar gadget. It is a simple and easy way to monitor energy usage of the processor:
- Provides processor power (Watts) and frequency (MHz) in real-time via graph displayed in the gadget
- Lets you log the power and frequency measurements and save it in a csv format.
Known Limitations/Issues
- Only works on 2nd Generation Intel® CoreTM processor family or later
- Use 32-bit installer only on 32-bit OS
Mac OS X* version
A version of Intel® Power Gadget 2.0 is now available for Mac OS X. The Mac version of Intel® Power Gadget 2.0 is functionally identical to the Windows version, but has some specific differences:
- The Power Gadget GUI is an application as opposed to a desktop gadget.
- It does not currently support multi-socket configurations (as there are currently no Mac systems with multiple 2nd generation Intel® CoreTM processors).
- The EzPwrLibrary API is written in Objective-C.
Contents
The Intel® Power Gadget 2.0 Mac version consists of the following components:
- Intel® Power Gadget GUI application.
- Driver (PowerGadgetDriver.kext) that accesses processor MSRs to determine processor power and frequency.
- Dynamic library (EzPwrLibrary.dylib) that provides an Objective-C API for accessing processor power and frequency data form the driver.
- Terminal application (PowerLogSample) that logs power and frequency data. The terminal application serves as an example of how to use the EzPwrLibrary API, and sample source and Makefile are also included.
System Requirements (Mac)
- Mac OS X 10.6 or later
- 2nd generation Intel® CoreTM processor or later
Installation/Setup
1. Download the Mac version of Intel® Power Gadget 2.0
2. Open "Intel® Power Gadget 2.0.dmg"
3. Run "Intel® Power Gadget.mpkg" installer
4. Follow the installer prompt instructions to complete installation. You will need to enter your password during the installation.
Usages
The Intel® Power Gadget GUI application for Mac can be launched by clicking the Intel® Power Gadget icon in Applications or Launchpad. The GUI application provides processor power (watts) and frequency (GHz) in a real-time graph; it also allows you to log the power and frequency data to csv file.
The PwrLogSample terminal application can be run by executing the following in the terminal:
$ cd "/Applications/Power Gadget/sample"
$ ./PwrLogSample <duration_in_sec> <log_path>
For information on using the EzPwrLibrary API, please see the readme.txt and the contents of /Applications/Power Gadget/sample
Download Intel® Power Gadget 2.0 now!
32-bit Intel® Power Gadget 2.0 (Windows)
64-bit Intel® Power Gadget 2.0 (Windows)
Intel® Power Gadget 2.0 for Mac
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (9) 
| December 31, 2011 6:44 AM PST
Michael Fuckner
| can you point me to the datasheet describing the MSRs you read with this program- or is there already anything working for linux? |
| January 2, 2012 12:16 PM PST
Jun De Vega (Intel)
|
MSR (package energy status) is documented in the Intel(R) 64 and IA-32 Architectures Software Developer's Manual Vol 3B. http://download.intel.com/design/processor/manuals/253669.pdf (page 841 or Vol 3B-B155 Table B-10, look for PKG Energy Status). Currently there is no immediate plan to release a Linux version of the tool. |
| January 3, 2012 10:19 AM PST
sbtech
|
thanks for the gadget i was look for it . |
| January 14, 2012 9:25 AM PST
Michael Fuckner
| are there any plans to push intel_rapl driver into linux kernel? Seems like this could do the same for perf on linux, but after a first try nothing happened to get it into stock kernel |
| February 4, 2012 6:48 PM PST
Larry M. |
Hey Jun, First off, I love this thing. Very useful with tuning my new laptop. Do you think you guys could "unlock" the setting bars in the next version? My Asus UX31E is using 2.2-2.4 Watts with the min power mode and it doesn't scale well on the graph. It's just a line. Thanks guys for all your hard work on this. -Larry |
| April 19, 2012 1:58 PM PDT
Sohil Mehta |
Hi, Can you give more information on how this tool measures frequency? I mean what H/W counters are used for measurement? Thanks, Sohil |
| April 19, 2012 4:25 PM PDT
sai_pursnal
|
Hey, I am using this tool and I have doubt regarding what h/w counters you are using to report frequency? We use unhalted ref and core cycles to measure average frequency and we see a delta of around 400 MHz between what your tool reports and what we see. Please let me know. |
| April 30, 2012 3:23 AM PDT
priya |
Hi, an ISV gets an error message while installing this tool " There is a problem with this windows installer package. A program run as a part of the set up didnot finish as expected. Contact your support personnel or package vendor" what could be the issue? Please help ASAP. Regards, Priya |
Trackbacks (7)
- Accessing Intel® Power Gadget from Intel® Energy Checker SDK – Blogs - Intel® Software Network
January 12, 2012 3:30 PM PST - Accessing Intel® Power Gadget from Intel® Energy Checker SDK – Blogs - Intel® Software Network
January 12, 2012 3:35 PM PST - [Sammelthread] Intel
January 13, 2012 7:43 AM PST - Accessing Intel® Power Gadget 2.0 library in C++ – Blogs - Intel® Software Network
January 21, 2012 10:25 AM PST - Accessing Intel® Power Gadget 2.0 library in C++ | ServerGround.net
January 21, 2012 11:20 AM PST - Intel gadget | Ahthionline
February 3, 2012 12:11 AM PST - Intel Sandy Bridge (Sockel 1155) OC Guide & FAQ - Seite 8
April 12, 2012 6:17 AM PDT
Leave a comment 
Jun De Vega (Intel)
| ||
Seung-Woo Kim (Intel)
| ||
| Karthik Krishnan (Intel) | ||
Patrick Konsor (Intel)
|


Janith Chandrakantha
60