'\" t .\" Title: loggen .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/25/2024 .\" Manual: The loggen manual page .\" Source: 4.6 .\" Language: English .\" .TH "LOGGEN" "1" "01/25/2024" "4\&.6" "The loggen manual page" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" loggen \- Generate syslog messages at a specified rate .SH "SYNOPSIS" .HP \w'\fBloggen\fR\fBtarget\fR\ 'u \fBloggen\fR [options]\fBtarget\fR [port] .SH "DESCRIPTION" .PP NOTE: The loggen application is distributed with the syslog\-ng system logging application, and is usually part of the syslog\-ng package\&. The latest version of the syslog\-ng application is available at \m[blue]\fBthe official syslog\-ng website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP This manual page is only an abstract, for the complete documentation of syslog\-ng, see \m[blue]\fBThe syslog\-ng Administrator Guide\fR\m[]\&\s-2\u[2]\d\s+2\&. .PP The \fBloggen\fR application is tool to test and stress\-test your syslog server and the connection to the server\&. It can send syslog messages to the server at a specified rate, using a number of connection types and protocols, including TCP, UDP, and unix domain sockets\&. The messages can be generated automatically (repeating the \fIPADD\fRstring over and over), or read from a file or the standard input\&. .PP When \fBloggen\fR finishes sending the messages, it displays the following statistics: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIaverage rate\fR: Average rate the messages were sent in messages/second\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIcount\fR: The total number of messages sent\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fItime\fR: The time required to send the messages in seconds\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIaverage message size\fR: The average size of the sent messages in bytes\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fIbandwidth\fR: The average bandwidth used for sending the messages in kilobytes/second\&. .RE .SH "OPTIONS" .PP \fB\-\-active\-connections \fR .RS 4 Number of connections \fBloggen\fR will use to send messages to the destination\&. This option is usable only when using TCP or TLS connections to the destination\&. Default value: 1 .sp The \fBloggen\fR utility waits until every connection is established before starting to send messages\&. See also the \fI\-\-idle\-connections\fR option\&. .RE .PP \fB\-\-csv\fR or \fB\-C\fR .RS 4 Send the statistics of the sent messages to stdout as CSV\&. This can be used for plotting the message rate\&. .RE .PP \fB\-\-dgram\fR or \fB\-D\fR .RS 4 Use datagram socket (UDP or unix\-dgram) to send the messages to the target\&. Requires the \fI\-\-inet\fR option as well\&. .RE .PP \fB\-\-dont\-parse\fR or \fB\-d\fR .RS 4 Do not parse the lines read from the input files, send them as received\&. .RE .PP \fB\-\-help\fR or \fB\-h\fR .RS 4 Display a brief help message\&. .RE .PP \fB\-\-idle\-connections \fR .RS 4 Number of idle connections \fBloggen\fR will establish to the destination\&. Note that \fBloggen\fR will not send any messages on idle connections, but the connection is kept open using keep\-alive messages\&. This option is usable only when using TCP or TLS connections to the destination\&. See also the \fI\-\-active\-connections\fR option\&. Default value: 0 .RE .PP \fB\-\-inet\fR or \fB\-i\fR .RS 4 Use the TCP (by default) or UDP (when used together with the \fI\-\-dgram\fR option) protocol to send the messages to the target\&. .RE .PP \fB\-\-interval \fR or \fB\-I \fR .RS 4 The number of seconds \fBloggen\fR will run\&. Default value: 10 .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Note that when the \fI\-\-interval\fR and \fI\-\-number\fR are used together, \fBloggen\fR will send messages until the period set in \fI\-\-interval\fR expires or the amount of messages set in \fI\-\-number\fR is reached, whichever happens first\&. .sp .5v .RE .RE .PP \fB\-\-ipv6\fR or \fB\-6\fR .RS 4 Specify the destination using its IPv6 address\&. Note that the destination must have a real IPv6 address\&. .RE .PP \fB\-\-loop\-reading\fR or \fB\-l\fR .RS 4 Read the file specified in \fI\-\-read\-file\fR option in loop: loggen will start reading from the beginning of the file when it reaches the end of the file\&. .RE .PP \fB\-\-number \fR or \fB\-n \fR .RS 4 Number of messages to generate\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Note that when the \fI\-\-interval\fR and \fI\-\-number\fR are used together, \fBloggen\fR will send messages until the period set in \fI\-\-interval\fR expires or the amount of messages set in \fI\-\-number\fR is reached, whichever happens first\&. .sp .5v .RE .RE .PP \fB\-\-no\-framing\fR or \fB\-F\fR .RS 4 Do not use the framing of the IETF\-syslog protocol style, even if the \fIsyslog\-proto\fR option is set\&. .RE .PP \fB\-\-quiet\fR or \fB\-Q\fR .RS 4 Output statistics only when the execution of \fBloggen\fR is finished\&. If not set, the statistics are displayed every second\&. .RE .PP \fB\-\-permanent\fR or \fB\-T\fR .RS 4 Keep sending logs indefinitely, without time limit\&. .RE .PP \fB\-\-rate \fR or \fB\-r \fR .RS 4 The number of messages generated per second for every active connection\&. Default value: 1000 .RE .PP \fB\-\-read\-file \fR or \fB\-R \fR .RS 4 Read the messages from a file and send them to the target\&. See also the \fI\-\-skip\-tokens\fR option\&. .sp Specify \fI\-\fR as the input file to read messages from the standard input (stdio)\&. Note that when reading messages from the standard input, \fBloggen\fR can only use a single thread\&. The \fI\-R \-\fR parameters must be placed at end of command, like: \fBloggen 127\&.0\&.0\&.1 1061 \-\-read\-file \-\fR .RE .PP \fB\-\-sdata \fR or \fB\-p \fR .RS 4 Send the argument of the \fI\-\-sdata\fR option as the SDATA part of IETF\-syslog (RFC5424 formatted) messages\&. Use it together with the \fI\-\-syslog\-proto\fR option\&. For example: \fI\-\-sdata "[test name=\e"value\e"]\fR .RE .PP \fB\-\-size \fR or \fB\-s \fR .RS 4 The size of a syslog message in bytes\&. Default value: 256\&. Minimum value: 127 bytes, maximum value: 8192 bytes\&. .RE .PP \fB\-\-skip\-tokens \fR .RS 4 Skips the specified number of space\-separated tokens (words) at the beginning of every line\&. For example, if the messages in the file look like \fIfoo bar message\fR, \fI\-\-skip\-tokens 2\fR skips the \fIfoo bar\fR part of the line, and sends only the \fImessage\fR part\&. Works only when used together with the \fI\-\-read\-file\fR parameter\&. Default value: 0 .RE .PP \fB\-\-stream\fR or \fB\-S\fR .RS 4 Use a stream socket (TCP or unix\-stream) to send the messages to the target\&. .RE .PP \fB\-\-syslog\-proto\fR or \fB\-P\fR .RS 4 Use the new IETF\-syslog message format as specified in RFC5424\&. By default, loggen uses the legacy BSD\-syslog message format (as described in RFC3164)\&. See also the \fI\-\-no\-framing\fR option\&. .RE .PP \fB\-\-unix \fR or \fB\-x \fR .RS 4 Use a UNIX domain socket to send the messages to the target\&. .RE .PP \fB\-\-use\-ssl\fR or \fB\-U\fR .RS 4 Use an SSL\-encrypted channel to send the messages to the target\&. Note that it is not possible to check the certificate of the target, or to perform mutual authentication\&. .RE .PP \fB\-\-version\fR or \fB\-V\fR .RS 4 Display version number of syslog\-ng\&. .RE .SH "EXAMPLES" .PP The following command generates 100 messages per second for ten minutes, and sends them to port 2010 of the localhost via TCP\&. Each message is 300 bytes long\&. .sp .if n \{\ .RS 4 .\} .nf loggen \-\-stream \-\-size 300 \-\-rate 100 \-\-interval 600 127\&.0\&.0\&.1 2010 .fi .if n \{\ .RE .\} .PP The following command is similar to the one above, but uses the UDP protocol\&. .sp .if n \{\ .RS 4 .\} .nf loggen \-\-inet \-\-dgram \-\-size 300 \-\-rate 100 \-\-interval 600 127\&.0\&.0\&.1 2010 .fi .if n \{\ .RE .\} .PP Send a single message on TCP6 to the \fI::1\fR IPv6 address, port \fI1061\fR: .sp .if n \{\ .RS 4 .\} .nf loggen \-\-ipv6 \-\-number 1 ::1 1061 .fi .if n \{\ .RE .\} .PP Send a single message on UDP6 to the \fI::1\fR IPv6 address, port \fI1061\fR: .sp .if n \{\ .RS 4 .\} .nf loggen \-\-ipv6 \-\-dgram \-\-number 1 ::1 1061 .fi .if n \{\ .RE .\} .PP Send a single message using a unix domain\-socket: .sp .if n \{\ .RS 4 .\} .nf loggen \-\-unix \-\-stream \-\-number 1 .fi .if n \{\ .RE .\} .PP Read messages from the standard input (stdio) and send them to the localhost: .sp .if n \{\ .RS 4 .\} .nf loggen 127\&.0\&.0\&.1 1061 \-\-read\-file \- .fi .if n \{\ .RE .\} .SH "FILES" .PP /usr/local/bin/loggen .SH "SEE ALSO" .PP \fBsyslog\-ng\&.conf\fR(5) .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP For the detailed documentation of see \m[blue]\fB\fBThe 4\&.6 Administrator Guide\fR\fR\m[]\&\s-2\u[2]\d\s+2 .PP If you experience any problems or need help with syslog\-ng, visit the \m[blue]\fB\fBsyslog\-ng mailing list\fR\fR\m[]\&\s-2\u[3]\d\s+2\&. .PP For news and notifications about of syslog\-ng, visit the \m[blue]\fB\fBsyslog\-ng blogs\fR\fR\m[]\&\s-2\u[4]\d\s+2\&. .sp .5v .RE .SH "AUTHOR" .PP This manual page was written by the Balabit Documentation Team \&. .SH "COPYRIGHT" .SH "NOTES" .IP " 1." 4 the official syslog-ng website .RS 4 \%https://www.balabit.com/log-management .RE .IP " 2." 4 The syslog-ng Administrator Guide .RS 4 \%https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.37/administration-guide .RE .IP " 3." 4 \fBsyslog-ng mailing list\fR .RS 4 \%https://lists.balabit.hu/mailman/listinfo/syslog-ng .RE .IP " 4." 4 \fBsyslog-ng blogs\fR .RS 4 \%https://syslog-ng.org/blogs/ .RE