public class VbsStatistics
extends java.lang.Object
VbsStatistics is responsible for generating statistics from flows contained in the MySQL database. | Modifier and Type | Field and Description |
|---|---|
private static java.util.Hashtable<java.lang.Long,java.lang.String> |
appMatch
Used to match particular flows with the application class (flow identifier -> application class).
|
private static java.util.Hashtable<java.lang.String,java.lang.String> |
contentMatch
Used to match particular HTTP content type with the application class (HTTP content type -> application class).
|
private static boolean |
drawCPUUsageStatistics
Flag telling if we should draw statistics of the CPU usage by particular clients on charts.
|
private static boolean |
drawTrafficStatistics
Flag telling if we should draw statistics of the traffic on charts.
|
private static boolean |
extractFromDatabase
Flag telling if we should extract the data from the database to external text files.
|
private static int |
flowLength
Flows (or subflows) having lesss then
flowLength packets will not be taken into account when calculating statistics. |
private static boolean |
getContentProfiles
Flag telling if we should process the external text files in order to obtain statistics for each type of the traffic separately.
|
private static boolean |
getTrafficStatisticsPerclient
Flag telling if we should get statistics for the traffic split by particular clients.
|
private static java.io.PrintWriter |
http
Used to write text lines to the file containing statistics for HTTP flows only.
|
private static int |
limitDown
Variable assigning one of the values from the
limitsDown list. |
private static int[] |
limitsDown
List of limits used to define the
web traffic. |
private static int[] |
limitsUp
List of limits used to define the
file traffic. |
private static int |
limitUp
Variable assigning one of the values from the
limitsUp list. |
private static java.io.PrintWriter |
nonhttp
Used to write text lines to the file containing statistics for non-HTTP flows only.
|
private static boolean |
processHttpFlows
Flag telling if we should work with flows containing HTTP content.
|
private static boolean |
processNonHttpFlows
Flag telling if we should work with flows containing non-HTTP content.
|
private static java.io.PrintWriter |
report
Used to write text lines to the report file.
|
private static java.sql.ResultSet |
rs
SQL result set.
|
private static java.sql.ResultSet |
rs2
SQL result set.
|
private static java.sql.ResultSet |
rs3
SQL result set.
|
private static java.sql.Statement |
stmt
SQL statement.
|
private static java.sql.Statement |
stmt2
SQL statement.
|
private static java.sql.Statement |
stmt3
SQL statement.
|
private static StatisticsFlow |
webFlow
The
WebFlow is a big subflow, which consists of many web subflows withing one transport layer flow. |
| Constructor and Description |
|---|
VbsStatistics() |
| Modifier and Type | Method and Description |
|---|---|
private static double[] |
convertArrayListToArray(java.util.ArrayList<java.lang.Double> list)
Converts the
ArrayList of Doubles to an Array. |
private static void |
drawCPUUsageByClientsStatistics()
Draws charts with visualization of the CPU usage by particular clients
|
private static void |
drawTrafficClassesStatistics()
Draws charts with visualization of the network traffic of some statistical parameters.
|
private static void |
extractInformationFromDatabase()
Extracts data from the MySQL database.
|
private static void |
getTrafficStatisticsPerclientFunc()
Gets traffic statistics for particular clients
|
private static void |
handleHttpSubflow(StatisticsFlow newFlow)
Processes each subflow within one HTTP transport layer flow.
|
private static void |
handleWebFlow()
Processes the
webFlow. |
static void |
main(java.lang.String[] args)
Main method of the statistic generator.
|
private static void |
obtainContentProfiles()
Obtains separate files with statistics for each application type.
|
private static void |
processAsHttpFlow()
Processes the flow as an HTTP flow and saves the calculated statistics in an external file.
|
private static void |
processAsNonHttpFlow()
Processes the flow as a non-HTTP flow and saves the calculated statistics in an external file.
|
private static boolean extractFromDatabase
private static boolean getContentProfiles
private static boolean processHttpFlows
private static boolean processNonHttpFlows
private static boolean drawTrafficStatistics
private static boolean drawCPUUsageStatistics
private static boolean getTrafficStatisticsPerclient
private static int flowLength
flowLength packets will not be taken into account when calculating statistics.private static int[] limitsDown
web traffic. HTTP flows containing less Bytes than the limit will be considered as web traffic.private static int[] limitsUp
file traffic. HTTP flows containing more Bytes than the limit will be considered as file traffic.private static int limitDown
limitsDown list.private static int limitUp
limitsUp list.private static java.sql.Statement stmt
private static java.sql.Statement stmt2
private static java.sql.Statement stmt3
private static java.sql.ResultSet rs
private static java.sql.ResultSet rs2
private static java.sql.ResultSet rs3
private static java.util.Hashtable<java.lang.Long,java.lang.String> appMatch
private static java.util.Hashtable<java.lang.String,java.lang.String> contentMatch
private static java.io.PrintWriter report
private static java.io.PrintWriter http
private static java.io.PrintWriter nonhttp
private static StatisticsFlow webFlow
WebFlow is a big subflow, which consists of many web subflows withing one transport layer flow.public static void main(java.lang.String[] args)
args - program arguments, not supported by the programprivate static void extractInformationFromDatabase()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void processAsNonHttpFlow()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void processAsHttpFlow()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void handleHttpSubflow(StatisticsFlow newFlow) throws java.lang.Exception
newFlow - the HTTP subflowjava.lang.Exception - if any exception occursprivate static void handleWebFlow()
throws java.lang.Exception
webFlow.java.lang.Exception - if any exception occursprivate static void obtainContentProfiles()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void drawTrafficClassesStatistics()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void drawCPUUsageByClientsStatistics()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static void getTrafficStatisticsPerclientFunc()
throws java.lang.Exception
java.lang.Exception - if any exception occursprivate static double[] convertArrayListToArray(java.util.ArrayList<java.lang.Double> list)
throws java.lang.Exception
ArrayList of Doubles to an Array.list - the ArrayList object to be converted to an Array objectArray objectjava.lang.Exception - if any exception occurs