API Documentation

class traffic_metrics.traffic_metrics.Traffic_Metrics(analysistype, files, outdir, rundashboard=False, filter_str=None, filenames=None, analysis_kind='both')[source]

Traffic Metrics analyzes network traffic from a pcap pcap file (or from a dataset csv of packets or PDUs derived from a pcap file using the traffic dataset maker) to present a JSON report of metrics and a set of charts for metrics from the input traffic. The tool also excels at comparing multiple packet traces based on statistics of numerous metrics, and charts.

__init__(analysistype, files, outdir, rundashboard=False, filter_str=None, filenames=None, analysis_kind='both')[source]
Parameters
  • analysistype (str) – the type of analysis to perform, chosen from the set of {packets,pdus,both}

  • files (list) – a list of strings where each represents the path to the input pcap or csv file to analyze

  • outdir (str) – output directory to save csv files

  • rundashboard (bool) – launch a webserver containing a dashboard for for interactive visualization of charts (default: False)

  • filter_str (str) – a filter string to filter specific packets to analyze (default: None)

  • filenames (list) – a list of strings where each represents the labels to use for each pcap or csv file to in the ‘files’ argument {default: None}

  • analysis_kind (str) – perform analysis of entire input pcap file or per each application user-session in input. values can be selected from the set {both,per_user_session,both} (default: both)

run()[source]

start traffic metrics analysis process