Skip to content

Visualizer

Dan Barrett edited this page Mar 21, 2017 · 9 revisions

Table of Contents

Introduction

The visualizer is a tool to help understand how traffic is routed in an XIA network. NOTE: Say some more here!

Usage

Setup

  • Make sure the Twisted Python library is installed on the node that will run the statsserver
sudo apt-get install python-twisted
  • Select one of the nodes in the network to run the stats server
Start the statsserver listening on TCP port 8888 on all interfaces. The statsserver is a simple http server that is used to aggregate the information from all the nodes in the network
This also starts the xstats daemon which retrieves XID count information from click and reports it to the statsserver
xianet -Z -other-options start
  • Tell the remaining nodes to run the xstats daemon and send statistics to the statsserver on port 8888 on the specified IP address or host name.
xianet -z <address of machine running stats server> -other-options start

Flash Setup

  • Install Flash for your web browser (sorry!)
  • Load the visualizer
firefox file:///home/yourname/xia-core/tools/visualizations/distributed_click/Visualizer.html
  • If necessary, tell flash it's OK to use local storage with this app. If nothing other than the key and controls appear after clicking start, you may need to tell Flash that it's OK to let the visualizer store its configuration information on disk. This only needs to be done once.
    • Right click on the setup screen
    • Select Global Settings...
    • Click the Advanced tab
    • Click the Trusted Location Settings button
    • Add the ~/xia-core/tools/visualizations/distributed_click/ folder to the list

Configure the Visualizer

  • Stat Server: enter the address of the statsserver including port # 8888. (http://localhost:8888).
  • Layout: This is intended to select how nodes are displayed in the output, but does not always work as expected. It's best to simply select Simple.
  • Traffic type: Selects how to display traffic
    • Final Intent: display statics based on where the ultimate destination for packets is. An AD->HID->SID DAG would show counts under SID only.
    • Next Hop: display statistics based on which part of the DAG is currently being evaluated. An AD->HID->SID DAG will be counted as different XID types depending on where in the network the processing occurs. See below for more information.
  • Show ManagementTraffic: intended to filter out routing messages from being displayed, but does not currently have an effect.
  • Show Map: has no effect.
  • Share max traffic rate across: Sets the scale of all graphs the same rather than letting them vary per link. (The controls can be dragged to a different location if desired).
  • Show Controls: displays a selector for Final Intent/Next Hop display on the output screen.
  • Show Key: displays an XID color key at the bottom of the screen. (The key can be dragged to a different location if desired).
  • Chart Type: selects the default chart type for showing traffic info. The image below shows the 'Compact Chart', 'Standard Chart', and 'Table' options. The displayed chart can be cycled through all of the options by clicking on it.

Traffic Examples

The examples below show the same traffic pattern, an echoserver running on host1 and an echoclient on router0. The DAG is AD->HID->SID. The width of the lines is relative to the amount of traffic being delivered. Larger lines indicate more data.

Final Intent

Because the final intent for all traffic in this example is a SID, it is the only thing displayed. The bulk of the traffic is between Router0 and Host1. There is some SID traffic shown on the link between Router0 and Host0: this is router daemon traffic.

Next Hop

In this case, packets are recorded based on their next hop, so we see mainly AD and HID counts.

  • Packets leaving Router0 in AD0 are traveling to a SID on Host1 in AD1.
    • The next hop in the link between Router0 and Router1 is an AD.
    • The next hop between Router1 and Host1 is an HID.
    • Because the nexthop to the SID is handled on Host1, we don't see any SID counts in the display.
  • Packets leaving Host1 in AD1 travel to router0 in AD0.
    • The AD counts between Host1 and Router1 are due to the fact that the packet is being routed to AD0 an we don't have a HID yet.
    • This is also why there is no HID traffic between Router1 and Router0.
    • The HID and SID are both routed internally on Router0 and are not shown in this display.
  • The smaller counts for FID traffic are due to xrouted messages.

Technical Details

Xstats

The xstats daemon runs on each node in the network. It queries the following information and sends updates to the statsserver once per second.

  • Read the host's route table and return a list of connected hosts
  • Read the final intent counts for packets leaving the host
  • Read the next hop counts for packets leaving the host

Statsserver

The statserver exposes 3 URLs for querying information.

Connections

http://localhost:8888/connections returns a list of hosts and the hosts they are connected to. This information is used by the visualizer app to draw the connections between the nodes.

Format:

hostname,host-ad,Host-hid,port-no,peer-hid
h1,AD:3cb6cd53c469d43b00eccddccdff18122a3c1a16,HID:2dc5249cab32794d0e488d35222a888f6f73fa45,0,XID,HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302
r1,AD:3cb6cd53c469d43b00eccddccdff18122a3c1a16,HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,0,XID,HID:476190d7e0630b8eeb09d1a46f6cfca805498907
r1,AD:3cb6cd53c469d43b00eccddccdff18122a3c1a16,HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,1,XID,HID:2dc5249cab32794d0e488d35222a888f6f73fa45
h0,AD:ffb5c7a8148e3a28617158a55834e2fdc41310a3,HID:76e24b20ba715b277f482aa1206470f44ecb3f4c,0,XID,HID:476190d7e0630b8eeb09d1a46f6cfca805498907
r0,AD:ffb5c7a8148e3a28617158a55834e2fdc41310a3,HID:476190d7e0630b8eeb09d1a46f6cfca805498907,1,XID,HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302
r0,AD:ffb5c7a8148e3a28617158a55834e2fdc41310a3,HID:476190d7e0630b8eeb09d1a46f6cfca805498907,0,XID,HID:76e24b20ba715b277f482aa1206470f44ecb3f4c

Final Intent

http://localhost:8888/next returns the final intent list of counts per host/port of traffic leaving the node.

Format:

hid,port,direction,ad,hid,cid,sid,ip,fid,unknown,0,0,0,0,0,0,0
The trailing seven 0's are for a feature that was never implemented and can be ignored by the consumer of the data.
HID:2dc5249cab32794d0e488d35222a888f6f73fa45,0,OUT,303,0,0,0,0,0,0,0,0,0,0,0,0,0
HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,0,OUT,1,0,0,0,0,16,316,0,0,0,0,0,0,0
HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,1,OUT,0,337,0,0,0,16,10,0,0,0,0,0,0,0
HID:476190d7e0630b8eeb09d1a46f6cfca805498907,0,OUT,0,0,0,0,0,0,28,0,0,0,0,0,0,0
HID:476190d7e0630b8eeb09d1a46f6cfca805498907,1,OUT,1,283,0,0,0,0,81,0,0,0,0,0,0,0
HID:76e24b20ba715b277f482aa1206470f44ecb3f4c,0,OUT,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Next Hop

http://localhost:8888/final returns the next hop list of counts per host/port of traffic leaving the node. The format of the data is the same as the final intent output.

HID:2dc5249cab32794d0e488d35222a888f6f73fa45,0,OUT,303,0,0,0,0,0,0,0,0,0,0,0,0,0
HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,0,OUT,1,0,0,0,0,16,316,0,0,0,0,0,0,0
HID:3b34a9e63b5fef4d8a22f2a4c9cd6e5a90a58302,1,OUT,0,337,0,0,0,16,10,0,0,0,0,0,0,0
HID:476190d7e0630b8eeb09d1a46f6cfca805498907,0,OUT,0,0,0,0,0,0,28,0,0,0,0,0,0,0
HID:476190d7e0630b8eeb09d1a46f6cfca805498907,1,OUT,1,283,0,0,0,0,81,0,0,0,0,0,0,0
HID:76e24b20ba715b277f482aa1206470f44ecb3f4c,0,OUT,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Caveats

  • The visualizer client is a Flash application that is unlikely to ever be updated again.
  • Non-operative features:
    • There is no ability to add addresses to the Saved Servers dropdown
    • There is no way to save a Custom Layout for the Layout dropdown
    • The display management traffic checkbox has no effect anymore because we have changed how routing messages are delivered
    • The Show Map checkbox has no effect
  • The retrieval of statistics data by the visualizer client occasionally stutters, so the values displayed should be taken with a grain of salt.
Clone this wiki locally