.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "linescroll" "1" "04 September 2023" "linescroll 0.2.0" "User Manual" .hy .SH NAME .PP linescroll - a tool to monitor log files .SH SYNOPSIS .PP linescroll [OPTION] [FILE]\&... .SH DESCRIPTION .PP shows line flow rate in \f[B]file(s)\f[R] or \f[B]stdin\f[R]. .PP \f[B]-c\f[R]/\f[B]--combine\f[R] all input sources into a single source .PP \f[B]-l\f[R]/\f[B]--limit\f[R] \f[B]ITERATIONS\f[R] exit after \f[B]ITERATIONS\f[R] cycles .PP \f[B]-s\f[R]/\f[B]--speedonly\f[R] don\[cq]t print graphs .PP \f[B]-p\f[R]/\f[B]--print\f[R] \f[B]ITERATIONS\f[R] print only every \f[B]ITERATIONS\f[R]\[cq]th stats .PP \f[B]-f\f[R]/\f[B]--filename\f[R] print filename headings .PP \f[B]-a\f[R]/\f[B]--noaxislimit\f[R] do not print the axis limits .PP \f[B]-n\f[R]/\f[B]--noclear\f[R] do not clear the screen between prints .PP \f[B]-r\f[R]/\f[B]--raw\f[R] treat input lines as values to add to counter .PP \f[B]-h\f[R]/\f[B]--help\f[R] print help .SH USAGE .PP linescroll can be used to show how much activity happens in log files or program output. .PP Bash can be used in conjunction to capture several programs as arguments for linescroll. .PP \f[B]stdin\f[R] can be used as a pipe if no other files are given as arguments, or if the special filename \f[B]-\f[R] is used. .SH EXAMPLE .PP Show relative difference of (un-)cached traffic: .IP .nf \f[C] linescroll \[rs] <( varnishncsa -F \[aq]\[dq]%{Varnish:hitmiss}x\[dq]\[aq] | grep \[aq]\[dq]hit\[dq]$\[aq] ) \[rs] <( varnishncsa -F \[aq]\[dq]%{Varnish:hitmiss}x\[dq]\[aq] | grep -v \[aq]\[dq]hit\[dq]$\[aq] ) \f[R] .fi .PP Or just rate of traffic through the cache via stdin: .IP .nf \f[C] varnishncsa -F \[aq]%h %l %u %t \[dq]%r\[dq] %s %b \[dq]%{Referer}i\[dq] \[dq]%{User-agent}i\[dq] \[dq]%{Varnish:hitmiss}x\[dq]\[aq] | linescroll \f[R] .fi .PP Build a graph of stats for email: .IP .nf \f[C] ( printf \[dq]From: cache\[at]darkstar\[rs]nTo: super\[at]webmasters\[rs]nSubject: cache effectiveness snapshot\[rs]n\[rs]n\[dq]; linescroll --limit 60 --print 60 \[rs] <( varnishncsa -F \[aq]\[dq]%{Varnish:hitmiss}x\[dq]\[aq] | grep \[aq]\[dq]hit\[dq]$\[aq] ) \[rs] <( varnishncsa -F \[aq]\[dq]%{Varnish:hitmiss}x\[dq]\[aq] | grep -v \[aq]\[dq]hit\[dq]$\[aq] ) ) | /usr/sbin/sendmail -fcache super\[at]webmasters \f[R] .fi .SH OPTIONS .IP .nf \f[C] -c, --combine combine all file source metrics -l, --limit ITERATIONS stop after number of iterations (default never) -s, --speedonly no graph, speed only -p, --print ITERATIONS print only every Nth iteration -f, --filename print filename headings -h, --help print usage help -n, --noclear do not clear screen between draws --nofollow do not follow file renames -v, --version display version number -r, --raw input is metric \f[R] .fi .SH AUTHORS Ed Neville (ed-linescroll\[at]s5h.net).