From 4c79bd3cca104e4aa7c71c5d6186b74e4e506741 Mon Sep 17 00:00:00 2001 From: Neil McKee Date: Tue, 25 Oct 2016 16:23:14 -0700 Subject: [PATCH] update installation documentation files --- INSTALL.Docker | 25 +++++++------------------ INSTALL.KVM | 3 +-- INSTALL.Linux | 41 +++++++++++++++++++---------------------- 3 files changed, 27 insertions(+), 42 deletions(-) diff --git a/INSTALL.Docker b/INSTALL.Docker index 7754e04d..d6d42d34 100644 --- a/INSTALL.Docker +++ b/INSTALL.Docker @@ -4,7 +4,7 @@ http://sflow.net/license.html Compile/install =============== -root> make DOCKER=yes PCAP=yes +root> make FEATURES="DOCKER PCAP" root> make install Edit /etc/hsflowd.conf for configuration, then: @@ -29,30 +29,19 @@ pcap { dev = docker0 } so that the traffic to and from the docker containers is monitored with sFlow. Alternatively, if Open VSwitch is running, -then starting sflowovsd will propagate sFlow configuration to -the v-switch via ovs-vsctl(1): +adding: -root> service sflowovsd start +ovs { } -Debugging -========= -To run in the debugger, compile with: - -root> make DOCKER=yes PCAP=yes OPT=-g - -and run with the "-d" or "-dd" command line option to -prevent daemonization and increase logging: - -root> gdb hsflowd -gdb> set args -dd -gdb> r +will propagate your collector and sampling-rate information +to the switch via ovs-vsctl(1). Packaging ========= To build an rpm, try: -% make DOCKER=yes PCAP=yes rpm +% make rpm FEATURES="DOCKER PCAP" To build a Debian package, try: -% make DOCKER=yes PCAP=yes deb +% make deb FEATURES="DOCKER PCAP" diff --git a/INSTALL.KVM b/INSTALL.KVM index c7f238d6..668c2cc7 100644 --- a/INSTALL.KVM +++ b/INSTALL.KVM @@ -6,8 +6,7 @@ Red Hat KVM Hypervisor To compile for a Red Hat KVM hypervisor: -DDK> export LIBVIRT=yes -DDK> make rpm +% make rpm FEATURES="KVM" The rpm will be written to /usr/src/redhat/RPMS// (where is i386 or x86_64 or ...) diff --git a/INSTALL.Linux b/INSTALL.Linux index 9bf1868e..0eeb3608 100644 --- a/INSTALL.Linux +++ b/INSTALL.Linux @@ -3,20 +3,17 @@ http://sflow.net/license.html To compile and install, try this: -% make +% make FEATURES="ALL" % sudo make install % sudo make schedule -To compile features that can be enabled in the config: - -% make FEATURES="ALL" - -Or you can specify them individually: +Features can be specified individually: -% make FEATURES="ULOG NFLOG PCAP DOCKER KVM OVS" +% make FEATURES="ULOG NFLOG PCAP DOCKER KVM OVS TCP" Edit /etc/hsflowd.conf for configuration. The options are -described in the comments there. +described here: +http://sflow.net/host-sflow-linux-config.php Module dependencies var from platform to platform, but the following packages usually have to be installed before @@ -34,9 +31,13 @@ To start the daemon, run: and check the syslog for errors. -To run in the debugger, change the Makefile to compile with -g, -recompile, and then run with the "-dd" command line option to -prevent daemonization: +To run in the debugger, first recompile like this: +% make clean +% make FEATURES="ALL" OPT=-g +% sudo make install + +and then run with the "-dd" command line option to +prevent daemonization and increase the logging level: % sudo gdb hsflowd gdb> set args -dd @@ -44,21 +45,17 @@ gdb> r For more detailed logging, using -ddd or -dddd. -To build an rpm from a git repo, try: +To build an rpm, try: % make rpm FEATURES="..." -To build an rpm from a sources tarball hsflowd-.tar.gz, -copy the tarball to your rpm SOURCES directory then run: - -% rpmbuild -ba hsflowd.spec --define _FEATURES "..." - -The rpm will be written to /usr/src/redhat/RPMS// -(where is i386 or x86_64 or ...) - To build a Debian package, try: % make deb FEATURES="..." -The hsflowd--.deb package should appear -in the current directory. +And to use Docker to compile natively on other platforms (if required) +you can try: + +% sudo ./docker_build_on + +Where is a directory under ./docker_build/