EnerNOC has carved out a name for itself as a demand-response firm, coordinating energy reductions during peak periods to prevent grid overloads — but today it’s expanding into a new role, tracking how much energy state-owned facilities in Massachusetts use, in order to buoy conservation efforts.

The contract, worth $10 million over three years, is being funded by the stimulus package via the U.S. Department of Energy. If all goes well, the best practices coming out of the study could save the state 5 to 15 percent off its annual energy expenses. As is, Massachusetts’ yearly energy bill amounts to about $200 million.

EnerNOC, which is based in Boston, will be receiving metering data from 470 buildings in the state, totaling 17 million square feet. The list is comprised mostly of state schools, prisons and municipal buildings. The company will not only be keeping tabs on how much electricity is being used, but also how it is being generated — whether from natural gas, oil or renewable sources like wind or solar. One of the side goals of the study is to shift the state’s power mix toward alternatives.

The study comes three years after Massachusetts Governor Deval Patrick pledged to slash state government energy use by 20 percent by 2012. Time is running out to accomplish the goal. It’s unlikely that major reductions will be made in the next two years, but analyzing how energy is generated and use is a vital first step toward better management.

Energy tracking isn’t what EnerNOC is known for. The core of its business is running demand-response programs. Basically, it is contracted by utilities to monitor power demand and supply. When it looks like demand is about to exceed supply, resulting in brownouts or blackouts, EnerNOC taps its commercial, industrial and institutional partners to reduce their energy use, restoring balance to the grid. In exchange, these partners get payments from the utilities, who in turn avoid pricey outages and maintenance operations.

But the company also offers several applications — SiteSmart, SupplySmart and CarbonSmart — for monitoring energy consumption and even carbon emissions. Each of these apps provides both measurement data and insights for how to shrink environmental footprints. EnerNOC branched into this area about a year and a half ago.

And this isn’t the only new area the company is pursuing. At the end of March, it acquired SmallFoot, a demand-response company focused on small businesses. Since its inception, EnerNOC has partnered with large companies, like big-box retailers and manufacturers. Now that it’s more established, it’s hoping to draw smaller companies and startups into its fold.

The new emphasis on energy tracking and small-scale demand response is solidifying EnerNOC’s dominance in the demand-response space. It’s the only public company focused exclusively on this market sector, leaving competitors Comverge and CPower running to catch up.