How do I measure server power consumption?
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.