diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/samplicator/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/samplicator/files')
-rw-r--r-- | net-misc/samplicator/files/samplicator.8 | 86 | ||||
-rw-r--r-- | net-misc/samplicator/files/samplicator.conf | 8 | ||||
-rw-r--r-- | net-misc/samplicator/files/samplicator.initd | 40 |
3 files changed, 134 insertions, 0 deletions
diff --git a/net-misc/samplicator/files/samplicator.8 b/net-misc/samplicator/files/samplicator.8 new file mode 100644 index 000000000000..1ddef2407238 --- /dev/null +++ b/net-misc/samplicator/files/samplicator.8 @@ -0,0 +1,86 @@ +.TH samplicator 8 "February 25, 2013" "" "samplicator" +.SH NAME +.B samplicator +\- UDP packets forwarder and duplicator +.SH SYNOPSIS +.B samplicator +.RB [ \-p +.IR port ] +.RB [ \-s +.IR address ] +.RB [ \-d +.IR level ] +.RB [ \-b +.IR size ] +.RB [ \-n ] +.RB [ \-S ] +.RB [ \-x +.IR delay ] +.RB [ \-c +.IR config ] +.RB [ \-f ] +.RB [ \-h ] +.RB A.B.C.D[/\fIport\fP[/\fIfreq\fP][,\fIttl\fP]] +.SH DESCRIPTION +.B samplicator +is simple program listens for UDP datagrams (NetFlow, sFlow, SNMP Trap, Syslog) +on a network port, and sends copies of these datagrams on to a set of destinations. +Optionally, it can perform sampling, i.e. rather than forwarding every packet, +forward only 1 in N. Another option is that it can "spoof" the IP source address, +so that the copies appear to come from the original source, rather than the relay. +.SH OPTIONS +The following command-line options are accepted by the server: +.IP "\-p \fIport\fP" +UDP port to accept flows on. Default \- 2000. +.IP "\-s \fIaddress\fP" +interface address to accept flows on. Default \- any. +.IP "\-d \fIlevel\fP" +debug level +.IP "\-b \fIsize\fP" +set socket buffer size. Default \- 65536. +.IP \-n +don't compute UDP checksum (leave at 0) +.IP \-S +maintain (spoof) source addresses +.IP "\-x \fIdelay\fP" +transmit delay in microseconds +.IP "\-c \fIconfig\fP" +specify a config file to read +.IP \-f +fork program into background +.IP \-h +print this usage message and exit +.IP A.B.C.D +is the receiver's IP address +.IP "\fIport\fP" +is the UDP port to send to. Default \- 2000. +.IP "\fIfreq\fP" +is the sampling rate. Default \- 1. +.IP "\fIttl\fP" +is the sending packets TTL value. Default \- 64. +.SH CONFIG +A.B.C.D[/E.F.G.H]: receiver +.IP A.B.C.D +is the senders IP address +.IP E.F.G.H +is a mask to apply to the sender. Default \- 255.255.255.255. +.IP receiver +is the IP address of receiver +.SH NOTES +.B samplicator +currently only supports IPv4. +.PP +Receivers specified on the command line will get all packets, those specified in the +.IR config +will get only packets with a matching source. + +.SH FILES +.B +/usr/sbin/samplicate + +.SH AUTHOR +.B samplicator +was originally written by Simon Leinen <simon.einen@gmail.com>. +.PP +This manual page was written by Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua> +for Gentoo Linux (and may be used by others)
\ No newline at end of file diff --git a/net-misc/samplicator/files/samplicator.conf b/net-misc/samplicator/files/samplicator.conf new file mode 100644 index 000000000000..3f38ccc9887b --- /dev/null +++ b/net-misc/samplicator/files/samplicator.conf @@ -0,0 +1,8 @@ +# Config file for /etc/init.d/samplicator + +# Various options. +# run `samplicator -h` for valid cmdline options +OPTS="-f -S -p 2000" + +# Receiver config file +#CONFIG="-c /etc/samplicator/receiver.conf"
\ No newline at end of file diff --git a/net-misc/samplicator/files/samplicator.initd b/net-misc/samplicator/files/samplicator.initd new file mode 100644 index 000000000000..8e516d680419 --- /dev/null +++ b/net-misc/samplicator/files/samplicator.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +NAME=${SVCNAME##*.} +if [ -n "${NAME}" -a "${SVCNAME}" != "samplicator" ]; then + PID="/run/samplicator.${NAME}.pid" + PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g') + CONF_DEFAULT="/etc/conf.d/samplicator.${NAME}" +else + PID="/run/samplicator.pid" + PNAME=${RC_SVCNAME} + CONF_DEFAULT="/etc/conf.d/samplicator" +fi +CONF=${CONF:-${CONF_DEFAULT}} +EXEC=${EXEC:-/usr/bin/samplicate} + +depend() { + need net + provide samplicator +} + +start() { + ebegin "Starting samplicator" + start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG} + eend $? +} + +start_post() { + pgrep -n $(echo ${PNAME} | sed 's/or/e/') > ${PID} +} + +stop() { + ebegin "Stopping samplicator" + start-stop-daemon --stop --quiet --pidfile ${PID} + rm -f ${PID} + eend $? +} + |