forked from sysml/blockmon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
159 lines (121 loc) · 5.7 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
BLOCKMON INSTALLATION INSTRUCTIONS
==============================================
To compile blockmon you will need gcc version 4.6 or higher (earlier
versions might work but have not be tested) as well as
cmake 2.8 or higher. In addition, you will need several external libaries
(see below) which need to be installed into the /lib/external directory.
Python 2.5 or higher is required for using the blockmon CLI. The daemon and
GUI further require the twisted json-rpc package:
http://pypi.python.org/pypi/txJSON-RPC/
and the json pickle package:
http://pypi.python.org/pypi/jsonpickle (jsonpickle webpage)
For more information on the CLI, daemon and GUI please see the README file.
EXTERNAL LIBRARIES
------------------
Several external libraries have to be installed into the /lib/external
directory. Follow the individual scripts listed here to do so.
1. Crypto-Pan
mkdir lib/external/crypto
cd lib/external/crypto
wget http://www.cc.gatech.edu/computing/Networking/projects/cryptopan/Crypto-PAn.1.0.tar.gz
tar xzf Crypto-PAn.1.0.tar.gz
mv Crypto-PAn.1.0/* .
mv sample.cpp sample.cpp.exclude
rmdir Crypto-PAn.1.0
cd ../../..
2. PugiXML
mkdir lib/external/pugixml
cd lib/external/pugixml
wget http://pugixml.googlecode.com/files/pugixml-1.2.tar.gz
tar xzf pugixml-1.2.tar.gz
cd ../../..
3. libfc (you need GIT installed for this)
cd lib
git clone git://github.com/britram/libfc.git fc
cd fc
git checkout af3065e37cdadabf00ed170c9830cfde57708b05
mv ipfix2csv.cpp ipfix2csv.cpp.exclude
mv fcprof.cpp fcprof.cpp.exclude
cd ../..
PORTABILITY
-------------
In theory should build on various systems including Linux and Windows, though
so far this has only been tested on the former.
PFQ
--------------
Blockmon supports PFQ (http://netgroup.iet.unipi.it/software/pfq/), an
accelerated packet capture engine designed for multi-core architectures.
By default the block of PFQ wil not be built; if you want to enable it
you have to give the -DWITH_PFQ=ON to cmake (see below).
The source code of PFQ is available from the public github repository
at https://github.com/pfq/PFQ.
Please note that before building Blockmon with -DWITH_PFQ, PFQ must be
installed on the system.
Please follow the instruction shipped with the package to install it.
Once PFQ is installed in the system, place the user-level PFQ header file
in the Blockmon build tree:
cp [PFQDIR]/user/c++/pfq.hpp [BLOCKMONDIR]/lib/external/pfq/
If the directory [BLOCKMONDIR]/lib/external/pfq/ does not exist just create it.
IPFIX
--------------
Blockmon supports IPFIX (http://datatracker.ietf.org/wg/ipfix/charter/) through a block
called IPFIXExporter. In order to build it, you will need to have the boost libraries
installed (http://www.boost.org/).
COMBO SZE2
--------------
Blockmon supports SZE2 interface for high speed data transfer from INVEA-TECH [1]
hardware acceleratorion cards COMBO. In order to build it, you will need to have
the NetCOPE development platform [2] and COMBO card [3] installed, and you will
need to run cmake with -DWITH_COMBO=ON (see below).
[1] http://www.invea-tech.com/
[2] http://www.invea-tech.com/products-and-services/netcope-fpga-platform
[3] http://www.invea-tech.com/products-and-services/combo-fpga-boards
TSTAT
--------------
Blockmon has a block which calls the tstat library.
Once tstat is installed in the system, place the following files in the
Blockmon build tree:
cp [TSTATDIR]/include/libtstat.h [BLOCKMONDIR]/lib/external/tstat/
ln -s [TSTATDIR]/libtstat/.libs [BLOCKMONDIR]/lib/external/tstat/libtstatdir
and compile Blockmon with -DWITH_TSTAT option.
INSTALL
--------------
On the main directory type
cmake .
If you would like to build optional features (or remove them) the syntax is
cmake -D<feature>=ON|OFF
Currently supported features are:
WITH_PFQ: Support for PFQ-based capture block
WITH_COMBO: Support for COMBO acceleration cards
WITH_DAEMON: Support for a json-rpc, python-based control daemon plus the CLI
(if you specify WITH_DAEMON=OFF the txJSON-RPC library is not required)
Furthermore you can chose between different implementations of the Packet class:
USE_SIMPLE_PACKET: Use new implementation of Packet class with simple memory allocator
USE_SLICED_PACKET: Use new implementation of Packet class with memory slice-allocator
If none of the above features is specified, the old Packet implementation is used (quite similar to SimplePacket).
The queueing behavior of InGates can also be specified using a feature:
BLOCKING_QUEUE:
BLOCKING_QUEUE=ON one can configure the queueing behavior for each
block individually in the composition XML (c.f. README). Since each
block can be configured differently a small overhead is introduced
even in the case the queues are not full. If highest message
processing performance is required (and messages may be dropped) one
should set BLOCKING_QUEUE=OFF.
Note that options passed with -D will persist across independent runs of cmake. For
instance, if you first run cmake with -DWITH_PFQ=ON and then run it without it,
the second run will also have -DWITH_PFQ=ON even if not explicitly given on the
command line. To revert this you would have to run cmake with -DWITH_PFQ=OFF;
subsequent runs will keep this value implicitly.
When cmake is finished, type:
make
That's it!
ERRORS
--------------
- If you get the error:
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
install the python-dev package. Under a Debian-based system:
sudo apt-get install python-dev
- If you're building blockmon with the daemon and cli and you get a link error
at the end of the build you may be missing the python boost libraries. Install
them with
apt-get install libboost-python1.42.0 libboost-python1.42-dev