Developers Guide for the
Traffic Measurement Data Visualization Tool
Table of Contents
1. Preface... 2 2. Requirements... 3 2.1 System requirements... 3 2.2 “Human” requirements... 3 3. Installation... 43.1. Setting up the base system... 4
3.2. Extracting the tool... 4
3.3. Configuring the tool ... 4
4. Importing a dataset ... 5
5. Overview of the tool ... 6
5.1. Statistic structure... 6
5.2. Directory structure... 6
5.3. Statistic generation process ... 7
6. Maintenance ... 8
6.1. Adding a statistic ... 8
1. Preface
This visualization tool has been developed as part of my Bachelor Assignment at the Architecture Group of the department of Computer Science, University of Twente. The assignment is “Visualizing Network Traffic Measurement Data” and is best described as:
“The goal of this assignment is to perform research on visualization of (characteristics of) network traffic measurement data. The result should include a prototype of such a system, including a database and scripts. To support the visualization process, an information system has to be developed to cope with huge amounts of measurement data and to handle complex queries. This information system will be built in collaboration with other students.”
The goal of this report is to enable other developers to contribute to this tool: adding extra statistics, fixing bugs, etc. The report will first cover installation (system requirements + the actual installation), importing the datasets and will then give an overview of the systemfiles, to enable you to perform maintenance.
I would like to thank my supervisors Remco van de Meent and Aiko Pras for their support and comments during the process of designing and creating this tool. Without their input this tool would have been much less powerful and less easy to use. Another big thank you goes out to Vincent Gaiser for helping me to create the base dataset system.
Marcel van Veen October 2003 Enschede, The Netherlands
2. Requirements
2.1 System
requirements
The tool has been developed under Windows XP Professional, but due to the portable nature of the used programs, the tool also runs fine under Linux. The tool has been developed and testing with the following applications:
• Apache version 1.3.27 ( http://www.apache.org ) • MySQL version 4.0.13 ( http://www.mysql.com ) • PHP version 4.3.1 (http://www.php.net )
2.2 “Human”
requirements
Although it is not strictly required, we recommend that this system will be installed and configured by an experienced PHP-programmer. A manual for PHP can be found at
http://www.php.net/manual. Other fine starter-manuals can be found at
3. Installation
3.1. Setting up the base system
The installation and configuration of Apache, MySQL and PHP will be left to the reader.
3.2. Extracting
the
tool
The full directory structure of the tool-archive should be left intact. All directories present in the archive are essential for a proper use of the tool. Extract the archive to the desired directory.
3.3. Configuring
the
tool
The total configuration needed for this tool is outlined in <install-directory>/config.php. There are 3 main configuration options. These are the databaseserver-connection parameters, the directory containing the flowdata that has to be imported and the databases available to the tool.
Database server connection
The connection to the MySQL database server is made using the following variables: $dbHost The hostname on which the database server resides
$dbUser The username used to connect to the database server $dbPass The password used to connect to the database server
Flowdata import directory
The $importDir variable should point to the directory where the flowdata resides.
Databases
The $dbList variable is an array containing all the databases available to the tool. These databases will all have to reside on the same database server (the one denoted in the “Database server connection” option). Each key of the array is a database entry, having 2 subkeys: ‘desc’ and ‘name’ for a description and the database name, respectively. Example:
$dbList[0][‘desc’] = “First database to be used”; $dbList[0][‘name’] = “databasename_1”;
$dbList[1][‘desc’] = “Second database to be used”; $dbList[1][‘name’] = “databasename_2”;
4. Importing a dataset
!!! Before importing a dataset, make sure the “importDir” variable is correctly set in config.php (see 3.3)!
Importing datasets can be done by pointing your webbrowser to the URL: <install-URL>/import/.
In this screen, you can select the datasets you wish to import (lower part of the screen) and the location you want to import them to (upper drop-down box). After selecting the desired datasets, click ‘import’. The system will begin importing the datasets. During this time, the window may appear blank. Please keep waiting until the status-indicator (bottom of the screen) states the page is fully loaded. By this time, the window should also state the result of the import-process.
5. Overview of the tool
5.1. Statistic
structure
Before performing maintenance on the tool, it is wise to understand the complete structure of the system. The different parts of the tool are divided into separate directories:
Statistic
Statistic Creation Code
Generic Image Type Class
Base Image Class
picture 5.1: Layer-diagram of a Statistic
All the statistics have the same structure. Each statistic has the same base layer: the “Base Image Class”. This layer handles the basic image creation and error logging. On top of this, a “Generic Image Type Class” layer handles the generic content display of the image. This section is currently divided into a Histogram, Scatter and “Standard” class. Layer number three handles the actual content generation. It retrieves the necessary data from the datasets and feeds this to the image classes to create the resulting statistic (layer 4).
5.2. Directory
structure
The layers are distributed over different directories. We will give a complete overview of all the directories (picture 5.2). 1. All the image classes (base & generic)are located in the “class” subdirectory. 2. All the statistic creation code is located in the “graphs” subdirectory, with an extra subdirectory for every statistic. 3. Directory “flowdata” is added as a default directory to save the flowdata files that are the input for the import system.
4. Directories “import”, “logfiles” and “visualize” aren’t necessary when
performing maintenance to the tool. picture 5.2: A complete directory overview
5.3. Statistic generation process
For a complete understanding of the tool, you should know which file is accessed in what stage in the statistic generation process. Each step of the process will be described below.
1. Selecting the image type
For each subdirectory of “graphs”, the file “config.php” is parsed. This file contains a description of the statistic that can be created with this subdirectory.
2. Statistic parameters
In this step, the file “selection.php” in the selected statistic-type subdirectory is parsed. This file contains a little bit of HTML-code that lets the user select all the relevant statistic variables.
3. Select dataset
This page does not use any files of the statistic-type subdirectory. It just let the user select the desired dataset and passes all the statistic parameters to the actual statistic-creation page.
4. Statistic-creation popup
The statistic that will be created is actually rendered via the file “render.php” in the statistic-type subdirectory. This file should include all the necessary Base & Generic image type classes and fill the image with data. For a more detailed look in how to create a “render.php” file, please examine the current render.php in the subdirectories.
6. Maintenance
Please read Chapter 5 before performing maintenance.
6.1. Adding
a
statistic
This procedure consists of 5 steps. Let’s pretend we want to add a statistic named “flowlength”.
1. Create a new /graphs/ subdirectory (i.e. “/graphs/ flowlength”)
2. Create a config.php in this subdirectory, containing a $desc variable that consists of a description of the new statistic type:
<?php
$desc = “Cumulative flow length size”; ?>
3. Create a “selection.php” containing the desired statistic parameters (for an example look at the provided statistics).
4. Create a “render.php” containing the code to create the image. The Image classes are documented and should be easily understandable. If necessary, create an extra “Generic Image Type Class” by creating the corresponding file in the /class subdirectory and importing it in your files. For an API of the existing classes, we refer to the sourcefiles of these classes.
5. Test your statistic by pointing your webbrowser to the tool-URL.
6.2. Altering
a
statistic
A statistic can simply be altered by editing the corresponding files in the /graphs/<statisticname>/ subdirectory.