Commit 9e52c9c0 authored by 's avatar
Browse files

Updated documentation


git-svn-id: file:///home/svn/mapi/trunk@340 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 24c45067
......@@ -6,26 +6,10 @@
2) multiple flows, with all parameters specified in a configuration
file given by command-line argument -f
- abw command line arguments:
Usage: abw [options] [header_filter]
-d device device (e.g., /dev/combosix/0, /dev/dag0, default eth0)
-m {d | b | p} sampling mode (default deterministic)
d - deterministic
b - byte deterministic
p - probabilistic
-r threshold pass packet when threshold is reached
number of packets for d mode (default 1)
number of bytes for b mode (default 3000)
pass probability for p mode (default 0.5)
-p string string to be searched in payload, multiple -p arguments
can be specified, packet passes when at least one match
-f filename file to read multi-flow specification (e.g., abw.cfg)
-i interval seconds between measurements (default 1)
-s DD.MM.YYYY-HH:MM:SS start time (default 01.01.1970-00:00:00)
-e DD.MM.YYYY-HH:MM:SS end time (default 31.12.2099-23:59:59)
-l mbps link installed bandwidth (default 1000)
-h this help message
- abw starts measurement for specified flows and produces results on
stdout and stores them to MySQL database
- type "abw -h" to print all possible command-line arguments
- Examples of use:
......@@ -66,3 +50,146 @@
longer periods
- aggregates for multiple characteristics (e.g., all protocols together)
- aggregates for multiple flows
Design decisions:
- in active monitoring, requests to MP (Measurement Point) can be requests
to perform measurements (send probes) and return results
- in passive monitoring, we assume long-term (possibly continuous) packet
processing, which should run independently and requests to MP should
just return previously obtained results
- therefore MP must somehow internally store measured characteristics,
it can be in plain text files or in SQL database, in any way old data
should be aggregated
- measurement configuration should be conveniently editable through web-based
interface, for this purpose, it is most convenient to store this configuration
in SQL database
- we decided to develop the following programs:
- Prototype C program abw reads measurement configuration from
configuration file abw.cfg or from command-line, does measurements
and prints results on stdout and stores them in MySQL database
command-line --> ----- --> stdout
| abw |
file abw.cfg --> ----- --> results in MySQL
abw runs on the monitoring node. With DiMAPI it can also run on
central machine and retrieve measurement data from measurement nodes
using DiMAPI.
abw does not allow to run measurements continuosly and read only
selected results and does not allow web-based editing of measurement
configuration.
Therefore, we separated the whole process into several parts
- processing measurement configuration
- doing measurements and storing raw results
- aggregating results
- retrieving results
- PHP scripts read requests on web interface and read, edit and store
measurement configuration in MySQL database, a signal is then sent
to the application doing measurements
-------------
web interface <--> | PHP scripts | <--> configuration in MySQL
-------------
|
v
abw_measure
PHP scripts run on central machine.
- C program abw_conf treads configuration file abw.cfg or command-line
arguments and adds or replaces configuration in MySQL database, a signal
is then sent to the application doing measurements
command-line --> ----------
| abw_conf | --> configuration in MySQL
file abw.cfg --> ----------
|
v
abw_measure
abw_conf runs on central machine.
- C program abw_measure reads configuration from MySQL database or
command-line (for easier testing), does the measurements and prints
results to stdout or stores them in MySQL database
command-line --> ------------- --> stdout
| abw_measure |
configuration in MySQL --> ------------- --> results in MySQL
abw_measure runs on measurement nodes, reads configuration remotely
from MySQL on central machine and stores results in local MySQL.
With DiMAPI it can also run on central machine and retrieve measurement
data from measurement nodes using DiMAPI.
- PHP scripts read results from MySQL database and present them on
web interface
-------------
web interface <--> | PHP scripts | <-- results in MySQL
-------------
PHP scripts run on central machine and retrieve results remotely
from MySQL on meaurement nodes or from local MySQL (such as
aggregated results)
- C program abw_print reads request for results from configuration file
abw.cfg or from command-line and prints results on stdout
----------- <-- request from abw.cfg or command-line
stdout <-- | abw_print |
----------- <-- results in MySQL
abw_print runs the same as PHP scripts.
Format of results printed on stdout is as follows:
<parameters_id> <seconds.microseconds> <packets>/<bytes> ...
Where <parameters_id> is equal to "id" field of [parameters]
section in measurement configuration, <seconds.microseconds>
is timestamp corresponding to the current line and <packet>/<bytes>
is the numner of packets and bytes measured for some characteristics.
There is one <packet>/<bytes> pair for each characteristics in
specified in "characteristics" field in measurement configuration.
- C program abw_aggregate reads aggregation configuration from MySQL
database or from command-line (for easier testing) and aggregates
results in MySQL database
command-line --> --------------- <-- raw results in MySQL
| abw_aggregate |
configuration in MySQL --> --------------- --> aggregated results
in MySQL
We assume that PHP scripts, abw.cfg and abw_conf will be extended to
also support aggregation configuration.
abw_aggreate can run on measurement nodes or on central machine and
works on the same MySQL or reads raw results from one MySQL and stores
aggregated results in another MySQL
- The main program for interface with perfSONAR or with Stager is abw_print.
When using Stager abw_aggregate is not necessary and can be provided by
Stager aggregate.pl script.
- File abw.cfg is used for two purposes:
- for measurement configuration
- for requests for results
The syntax is the same. For measurement configuration, start_time_string,
end_time_string and interval specify time span and frequency when
measurements are done. For requests for results, we may specify narrower
time span and lower frequency.
# Example of name/value pairs in empty category
name1=value1
name2=value2
# Named categories follow
# [node] specifies where measurement should be done. We should normally
# specify two things - hostname or IP address and device file. Multiple
# [node] sections can be specified for several measurements done in parallel.
[node]
id=1
......@@ -15,6 +12,14 @@ id=2
hostname=jra1-1.cesnet.cz
device=eth0
# [parameters] specify various measurement parameters. "node_id" must refer
# to "id" of the [node] where measurement should be done. "characteristics"
# includes one or more characteristics to be measured separated by commas.
# These characteristics must be recognized by the used measurement tool
# (e.g., abw). Values should not include spaces except for "header_filter",
# which can include spaces. Multiple [parameters] sections can be specified
# for several measurements done in parallel.
[parameters]
id=1
node_id=1
......
......@@ -2,6 +2,16 @@
#
# mysql -u root -p abw < create_tables.sql
DROP TABLE IF EXISTS tMeasurement;
CREATE TABLE tMeasurement (
id int NOT NULL auto_increment,
subject_id int NOT NULL,
parameters_id int NOT NULL,
start_time DATETIME,
end_time DATETIME,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS tSubject;
CREATE TABLE tSubject (
id int NOT NULL auto_increment,
......@@ -28,11 +38,12 @@ CREATE TABLE tParameters (
DROP TABLE IF EXISTS tValue;
CREATE TABLE tValue (
id int NOT NULL auto_increment,
subject_id int NOT NULL,
parameters_id int NOT NULL,
measurement_id int NOT NULL,
timestamp_sec int,
timestamp_usec int,
characteristics varchar(32),
unit varchar(16),
statistics varchar(16),
value_int int,
value_float float,
value_varchar varchar(32),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment