OpenSeer

From OpenFlow Wiki

Jump to: navigation, search

Contents

Introduction

This is a CGI script that we use for plotting the monitoring data collected in the deployment. It uses three main modules:

  • Query composer: The query constraints are passed in through the CGI input. These constraints can be any combination of the following:
    • Time range of the logs
    • Exact value match on certain fields
    • Additional SQL-like queries.
  • Database engine: Performs MySQL query
  • Plotter: Uses matplotlib to generate a PNG of the requested graph. The PNG is displayed on the returned webpage. Currently, the script can plot three different types of plots:
    • Lineplot
    • Scatterplot
    • CDF

Download

Copy the file OpenSeer.py to the cgi-bin directory of your webserver, rename the file extension to .cgi and update the line connect("localhost","login","passwd","db" with the right credentials.

Instructions

DATABASE

For the plotting to work, the first step is to populate the table called "ColsToPlot" in the local database where the monitoring data is stored. This table listing the tables of interest and the column of that table you want plotted. If you want to plot multiple columns of same table, please add multiple entries.

Example:

+-----------+------------+
| TableName | ColumnList |
+-----------+------------+
| FlowDB    | Duration   |
| FlowCount | TotalFlow  |
+-----------+------------+

FORM USAGE

  • Table to Plot: This drop down list is populated from "ColsToPlot".
  • Type: At this point, the backend CGI code supports LinePlot, CDF, and Scatterplot.
  • Obs_interval: The binning interval for each value. The numerical values in each bin are average and then plotted according to the above type.
  • Start_date and End_date: Required fields to narrow the database search
  • Additional constraints: This is appended to the SQL query. Thus, any additional constraints (Ex: "WHERE X==Y and ...") can be included here for more refined search.

Once the above fields are filled, click on "Add" to include in the list of plots to display. Once all plots are entered, click "Submit".



--[Srini] 06:52, 8 July 2009 (PDT)