Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Jordon Bedwell Nov 15 '10 at 17:34

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
+1, Although the monitor probably wont be much use in Wales but there alternatives for the UK. –  Richard Holloway Nov 15 '10 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 '10 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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