Today, High Performance Computing clusters (HPC) are an essential tool owing to they are an excellent platform for solving a wide range of problems through parallel and distributed applications. Nonetheless, HPC clusters consume large amounts of energy, which combined with notably increasing electricity prices are having an important economical impact, forcing owners to reduce operation costs. In this work we propose a software, named EECluster, to reduce the high energy consumption of HPC clusters. EECluster works with both OGE/SGE and PBS/TORQUE resource management systems and automatically tunes its decision-making mechanism based on a machine learning approach. The quality of the obtained results using this software are evaluated by means of experiments made using actual workloads from the Scientific Modelling Cluster at Oviedo University and the academic-cluster used by the Oviedo University for teaching high performance computing subjects.