wiki:v1

Version 17 (modified by naitabde, 15 years ago) ( diff )

--

Requirements

  • python 2.4 or later
  • rrdTool
  • MySQL
  • other python modules:

a) matplotlib

b) pyrrdTool

c) numpy

d) pysnmp

e) pysqlite

Modules

Currently, existing modules are:

  • storeCons.py : this scrip has as a function to get the values of power consumption of the data center's machines in real-time via SNMP (Simple Network Management Protocol) and to store them in the database .

NB: A cron job for this script is lunched every 5 minutes

  • getLoadFromRRD.py : this is the python script for moving average load values from rrd databases to the PowerMon SQL database

NB: A cron job for this script is lunched every hour

  • updateDb.py : update the database1 with the two configuration files: f_config_machines.cfg and f_config_pdus.cfg :

performs adding new pdu or a new machine to the database, and modifying their characteristics.

NB: The table 'PDU' must be modified before the table 'machine' because of foreign keys raisons

  • viewCons.py The vizualisation script, that generates different plots via python plotting library MatplotLib,representing the power consumption and the average load of a machine during a certan period of time. This vizualisation tool is not finished yet
    1: PowerMon project supports all types of databases that are tolerated by sqlAlchemy (sqlite,mysql,posgresql,oracle...) 
         Therefore, we can specify which database we want to connect to , in the default section of f_config_pdus.cfg 
    

Classes

  • 1. DbConn Objects: a DbConn object is responsible of database connection management and all the interactions with it

Constructor:

class DbConn(dbName,dbType,username,password,host,port)

dbName,dbType,username,password,host,port are string arguments specified in the configuration file : f_config_pdu.cfg on section default

In PowerMon V1, "dbType" is either 'sqlite' or 'mysql' : other types may also be supported provided that they are supported by sqlAlchemy and that this constructor is appropriately modified

  • class PDU: Allows to be connected to a supervisable pdu and extract machines' power consumption data
Note: See TracWiki for help on using the wiki.