Skip to content. Skip to navigation

Portal flowmon

Sections
Personal tools
You are here: Home FlowMon Probe User Docs Starting the probe
Document Actions

Starting the probe

by Ladislav Lhotka last modified 2006-05-22 17:37

This document describes how to get the FlowMon firmware up and running.

Before proceeding to the instructions below, make sure that you successfully installed the FlowMon card and all firmware and software, as described in Installation. Also verify that all the kernel modules have been properly loaded:

$ /sbin/lsmod
netflow_ph1
scampi
combo6
combo6core

Depending on your installation, you may see other modules as well. You can also check the output of dmesg(8):

$ dmesg | grep combo
[ 1593.619943] combo6#0: device 0xf1010002 (NETFLOW_1Gbps_Probe) successfully attached

The easiest way to start both the probe and exporter programs in one step – which is also suggested by the README file in the distribution package – is to go to the base/vhdl_design/projects/netflow_ph1/test/ directory, edit the variables at the beginning of the run script in that directory and then run the script without parameters.

In what follows, I will show the bare bones of the run script as two separate and simple scripts that hopefully give you some insight in what is really happening under the hood. If something goes wrong, you can perform these scripts one after another.This may help you in isolating the source of the problems.

Booting the firmware

The following script can be used to start the probe:

#! /bin/bash
ACT=30          # active timeout
INACT=10        # inactive timeout
MCS_PATH=/usr/local/mcs/netflow/01_03
FPGA8=mtx-1-2v1000-fpga0.mcs
FPGA9=mtx-1-2v1000-fpga1.mcs
FPGA0=combo6-1-2v3000.mcs

csboot -d /dev/combosix/0 -D
csboot -d /dev/combosix/0 -v -f 8 $MCS_PATH/$FPGA8 \
       -f 9 $MCS_PATH/$FPGA9 -f 0 $MCS_PATH/$FPGA0
sleep 2
netflowctl_ph1 -c init -e $MCS_PATH/netflow.bin
netflowctl_ph1 -c act_timeout -v $ACT -b
netflowctl_ph1 -c inact_timeout -v $INACT -b
csboot -d /dev/combosix/0 -a

The initial lines contain variable definitions that you may want to change to suit your needs. In particular, two lines that may need changes are those defining the variables FPGA8 and FPGA9. They specify the file names of firmware images that will be downloaded to the two FPGA chips on the FlowMon interface card. Of course, the images are specific to your hardware setup. Actually, the file names encode two independent pieces of information:

  1. Type of the interface card: for the COMBO-4MTX card, the file names start with mtx- and for COMBO-4SFP they start with sfp-.
  2. Size of the Virtex II FPGA on the interface card: The COMBO-4MTX and COMBO-4SFP are populated with one of the following Virtex II sizes: XC2V1000 and XC2V2000. These codes are indicated on the chips.

To find out this information without physically inspecting the interface card, use the csid command, for example:

$ csid
combo6 mtx2 xcv1000

Here, the program found an MTX interface card with the XC2V1000 FPGAs. The appropriate firmware images in this case would be as in the script above.

Basic checks

After adjusting the variables and running the script, the FlowMon card should be up and running. To verify that it is really the case, check the /proc/driver/combo6/card0:

$ ls /proc/driver/combo6/card0/
id  netflowph1-regs

If you do not see these files (or directory), something must have gone wrong. Next, look at the contents of these files:

$ cat /proc/driver/combo6/card0/id
Board    : combo6
Addon    : mtx2
Chip     : xcv1000
Firmware : ok
SW       : 0xf1010002
HW       : 0x2
Text     : NETFLOW_1Gbps_Probe

Device [combo6] netflow-ph1
  (0xf1010002-0xf10100ff) {NETFLOW_1Gbps_Probe}: active
Device [combo6] netflow-ph1
  (0xf1010001-0xf1010001) {NETFLOW 1Gbps Probe}: inactive

The other file tells you more about the dynamics:

$ cat /proc/driver/combo6/card0/netflowph1-regs
SW_ID:          f1010002
HW_ID:          00000002
IRQ mask:       00000000
IRQ pending:    00000001
FPGA intercomm: 00000001
Input items:    b077e9f7
Received items: dc5b1b30
Memory config:  02000008
Write pointer:  00000130
Read pointer:   00000131
IRQ items:      00000020
IRQ timeout:    0000000a

The following items are of immediate interest to probe users:

Input items
Counter of incoming flows
Received items
Counter of flows that have been accepted
Write pointer
Write pointer to the buffer of exported flows (updated by hardware).
Read pointer
Read pointer to the buffer of exported flows (updated by software).