You'll need a hardware device to do this - except maybe for server equipment with power monitoring features (which I doubt you have).
If you want to measure the AC power consumption of your computer, your best bet would be to pick up one of those Kill-a-watt devices that you plug the computer's power cord into.