You can get this from most recent generation servers via IPMI provided they have an out of band management interface such as ILO (HP), DRAC (Dell), RSA (IBM), Fujitsu Siemens (IRMC). These have mostly been optional extras in older servers but the recent trend has been to include a basic version in most midrange servers at least. The much more basic Baseboard Management Controller (BMC) interfaces will also generally give you pretty good power consumption numbers and a capability of this type has been pretty much standard on Server hardware from most vendors for quite some time although it generally will have to be explicitly enabled if you want to use the out of band capability.
The one problem with IPMI is that you need a systems management console of some sort to make much use of it. There are some simple command line tools available from Intel that might do what you want and they have some demo code if you want to roll your own stuff.
On a fully configured server you can get in band access to the BMC counters (it gives you power consumption, temperature's from the enclosure sensors, fan speeds and some cpu data amongst others) via WMI\SNMP if you have installed the appropriate vendor's management agents. The problem with this is that there is no standard target counter set for you to query.
On the client side there is some support for IPMI in Intel vPro (AMT) and AMD ASF enabled business clients. Again you will have to configure these management capabilities on the target systems which can be quite a headache.
This is a feature that is available on some of the systems management consoles - if you want to play with one then Dell's DMC is a free download and it will give you all of this for quite a broad range of Servers and Clients as it is not specifically limited to supporting Dell hardware. This is in an early release state at the moment but it is full blown systems management software though so it needs a bit of work to get it to do what you want.