On my system I can obtain the power drawn from the battery from
cat /sys/class/power_supply/BAT0/power_now
9616000
On Thinkpads if the tp_smapi module is loaded, the file is
cat /sys/devices/platform/smapi/BAT0/power_now
The value seems to be in µW, though. You can convert it with any tool you're comfortable with, e.g. awk:
awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now
9.616 W
In case you cannot find the location within the sysfs file system, you can search for it:
find /sys -type f -name power_now 2>/dev/null
Additionally, the package lm-sensors may be used to determine the system power usage on some machines:
# sensors power_meter-acpi-0
power_meter-acpi-0
Adapter: ACPI interface
power1: 339.00 W (interval = 1.00 s)
My laptop has none of these (it also has no battery currently), but it does have a "powercap" device.
It seems this device is able to set restrictions on the user power.
And it (naturally) can read the power draw in order to enforce them.
The power draw can be found at the energy_uj file, i.e.:
cat /sys/class/powercap/*/energy_uj
It'll show the lecture (or lectures, if you have many powercap devices) in micro-Joules. This is actually a counter of the energy consumed, so you need to divide it by a time delta in order to get the power.
Is this the power drawn by my laptop, or just a part of it? I don't know.
We have created a terminal tool to monitor CPU frequency/utilization/Temperature. It now also supports monitoring power on Intel CPUs newer than Sandy-Bridge.
You can see the power graph in watts on the bottom as well as on the side bar.
This only reads total CPU power, not per process and not including other components.

The simple answer is: You can't by software
powertop seems to be fair in this situation
Use an electronic watt-meter
In instance check this link from intel