With the rapid development of cloud computing technologies and applications in recent years, the number and scale of cloud data centers have rapidly increased while the problem of energy consumption in cloud data centers has become more and more serious. Therefore, energy consumption management has gradually become one of the hot issues in the field of cloud computing. For this reason, this paper aims at building a power model of servers and investigates the energy-measurement system. We propose a distributed energy consumption measurement system (abbreviated as DEM) for heterogeneous cloud environments based on a multi-component power model. We investigate the mathematical relationship between the resource usage of the key components (CPU, memory and disk) and the system energy consumption. Then we give the power modeling method of each key component. DEM can not only estimate energy consumption of heterogeneous cluster environments (Linux and Windows NT), but also support various CPU power models. In addition, we also present a disk power model that uses several thresholds to distinguish between disk sequential and random read/write status, for achieving more accurate disk power calculation. Experiments are performed on a heterogeneous cluster with workload generated by PCMark and Sysbench. The results show that the proposed DEM system can not only achieve measure the energy consumption of heterogeneous cloud servers, but also have great accuracy on estimating cluster energy consumption.