Today's datacenters are equipped with diverse computing and storage devices for handling a myriad of data and normally consume a significant amount of electrical energy. This paper proposes a smart grid inspired methodology to monitor and profile the energy consumption of a datacenter, with the aim of providing information useful for reducing the peak power consumption of the datacenter. Our energy measurement platform is named CloudSocket, and each CloudSocket unit can measure the power consumption of an individual computing node and periodically transmit the measurement information wirelessly to the coordinator unit that can manage many Cloud-Sockets simultaneously. We tested our methodology with a 32-node grid system that runs Apache Spark for large-scale data analytics. Analyzing our experimental results reveals how and where the peak power of each node in the grid overlaps, providing opportunities for informative coordination of the computing components for overall power reduction.