Is there a command, or package that can be used to calculate how much power my server is drawing? I am interested in knowing how much my server is costing me to run. I know the calculations of how much it would cost if drawing the full 300 Watts from the PSU, but I believe that this is unlikely to be the reality of it.

It is being used as a file and media server, so most of the time it will be reasonably idle. It is also running as a headless server, so all I am interested in, is the server itself.

  • An idea is to grab the current voltage each piece of hardware is using and then convert it. This is what UPS systems do, it wouldn't take much math, but the theory fits. You should be able to pull CPU voltage using sensors. Since I expect you run a normal server you probably wouldn't be using any USB devices but you would need to calculate minimal voltage. There is a lot to it but it might be worth it to if you want to stay green. Nov 15, 2010 at 17:34

3 Answers 3


I don't think it's possible to calculate the power consumption by software in a reliable manner.

Some (most?) notebook can tell you how much power you're drawing from the battery. But I don't think that this is possible for desktop computers or servers without special hardware.

If you have physical access to the server, you could just plug it in an electricity usage monitor, e.g. this one for 22 USD.

  • +1, Although the monitor probably wont be much use in Wales but there alternatives for the UK. Nov 15, 2010 at 11:40
  • I'm from Switzerland, the monitor I linked to wouldn't be much use to me either :-) I just wanted to give an example.
    – pableu
    Nov 15, 2010 at 12:49

AFAIK most server & desktop hardware doesn't have the necessary hardware parts to measure this (unlike laptops where this is part of the battery electronics).

If you have an UPS, then this might be part of its features, so if you have one, you might want to look at its documentation.

Otherwise, there also devices that you can put between the server and the wall plug to measure this.


Thanks to the RAPL capabilities available in many intel/amd cpus (that is pretty reliable compared to a physical wattmeter) there are some projects emerging for that in the last years.

One of them is scaphandre. This is pretty recent but you can already get the machine power consumption and the consumption of each processes running on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.