I am working on a windows application(C#) to monitor computers. Are there any way to get current power usage in windows ?
Asked
Active
Viewed 1,903 times
4
-
wmi might have something like that although i imagine only for laptops through battery interface.. you could get current for the +12v and +5v on the desktop. – zaitsman Dec 15 '15 at 08:52
-
1Hi, what does *power usage* mean to you ? What kind of units/values would you expect ? – sodawillow Dec 15 '15 at 08:55
-
@sodawillow - Hello, I want to monitor power usage in windows operating system. Like if a computer is in use for 12 hours in a days, then how much power(watt) it consumed during 12 hours ? – Amit Kumawat Dec 15 '15 at 08:59
-
2I'm quite confident that power usage monitoring can only be done from outside the computer :-/ – sodawillow Dec 15 '15 at 09:04
-
See http://www.makeuseof.com/tag/how-much-power-is-your-pc-using/ and http://powersupplycalculator.net/ – sodawillow Dec 15 '15 at 10:49
-
@sodawillow - Thanks ! But I want to implement my own code. :) – Amit Kumawat Dec 15 '15 at 11:09
-
Maybe you can grab reference values for each type of hardware (I imagine this could get really long and inaccurate), detect hardware, and make up an average based on that ... – sodawillow Dec 15 '15 at 11:10
-
@sodawillow - Yes. I think so. But after done this, still I'm not sure I can get the right amount of power usage and after does this, installed software and running software also can effect the power usage ? – Amit Kumawat Dec 15 '15 at 11:13
1 Answers
1
This is simply not supported under Windows. MS documents their PowerManagement API
I walked through every subheading, and nowhere can such detail be monitored. If the system is on battery and you poll the %battery remaining (which is not terrible accurate), you would know about as much as is possible through the API

Gary Walker
- 8,831
- 3
- 19
- 41