0

As the question says ,I want to monitor the value of power(watts) that some components consumption .especially the value of CPU , Memory and disk .

when I use aida64,I found that in computer/sensor ,there are some data about power consumption . I want to know how did it can get these data ?

I already have some idea ,but not sure which is the best way to solve this question :

  1. there are some sensors on the motherboard ,we can use values of those sensors to calculate the real-time power.

  2. according to different OS, we have some APIs that can get the utilization of cpu,memory throughout rate and disk I/O rate . Using this data ,we can build mode of power consumption about PC.if there are those APIs,where can I find them ?

  3. maybe the hardware manufacturer like intel has already record the value of power in real-time ,they put the value into some special register in hardware .we can get the value through mapping into special memory location .

In my opinion ,the second way maybe the solution that most monitor software using .but I just don't know where can I get those API.

whats more ,our aim is to design an OS-independent real-time power monitor software. So, if there are any better solutions about this question ,I will appreciate your help .

spartawhy117
  • 511
  • 1
  • 5
  • 22
  • 1
    An OS-independent power monitor? I'd be pretty surprised if you can do this at all, on any PC without dedicated, special-to--type power measurement hardware. – Martin James Jul 27 '15 at 13:55
  • https://software.intel.com/en-us/articles/intel-power-gadget-20 – xmojmr Jul 27 '15 at 14:27
  • we just want to build different models to estimate the power of machine .we will ignore some unimportant components . – spartawhy117 Jul 28 '15 at 05:57

1 Answers1

0

Hmmm. I wasn't sure if I should post this as a comment or an answer. It is an answer but in the negative.

At this time, you can't create an OS independent software-based non-intrusive power monitor. By non-intrusive, I mean that you are not putting special instrumentation on the motherboard and other hardware. This is because the power technology being used by modern processors is in rapid flux, each new generation making significant advances. Additionally, the amount of power related information available to software from the hardware (via PMU events and the like) is continually increasing as more silicon real estate becomes available. For example, I believe that in the most current processors, you can get direct thermal information for key parts of the processor silicon, and temperature, power and current readings from various parts of the core and uncore.

The best you can do is to abstract the top layer of your monitor from the lower layers. Then the top becomes OS / HW independent while the lower levels need to be platform dependent.

Check out the PAPI APIs. Note that the APIs appear to give you the world, but are really just an API set. Someone still has to implement what's on the other side of the API.

Now if you can do your own special instrumentation, many (most?) motherboards and other hardware have measurement points (some undocumented) that provide thermal, current (and so power) information. This information is important for debugging devices and platforms.

Taylor Kidd
  • 1,463
  • 1
  • 9
  • 11