Is it possible to measure energy consumption from power socket?
Energy is the accumulation (or integration) of power over time.

Power is voltage x current.

To measure current you need to have something that is "in-line" with the current flow.

You can't do that from any particular outlet.

If you can't determine what the current taken is you can't calculate power.

If you can't calculate power you can't determine energy consumption.