@@ -9,9 +9,21 @@ This manual page documents briefly the
.B lnstat
command.
.PP
\fBlnstat\fP is a generalized and more feature-complete replacement for the old rtstat program.
In addition to routing cache statistics, it supports any kind of statistics the linux kernel
exports via a file in /proc/net/stat/.
\fBlnstat\fP is a generalized and more feature-complete replacement for the old
rtstat program. It is commonly used to periodically print a selection of
statistical values exported by the kernel.
In addition to routing cache statistics, it supports any kind of statistics the
linux kernel exports via a file in /proc/net/stat/.
.PP
Each file in /proc/net/stat/ contains a header line listing the column names.
These names are used by \fBlnstat\fP as keys for selecting which statistics to
print. For every CPU present in the system, a line follows which lists the
actual values for each column of the file. \fBlnstat\fP sums these values up
(which in fact are counters) before printing them. After each interval, only
the difference to the last value is printed.
.PP
Files and columns may be selected by using the \fB-f\fP and \fB-k\fP
parameters. By default, all columns of all files are printed.
.SH OPTIONS
lnstat supports the following options.
.TP
...
...
@@ -28,7 +40,7 @@ Print <count> number of intervals.
Dump list of available files/keys.
.TP
.B \-f, \-\-file <file>
Statistics file to use.
Statistics file to use, may be specified multiple times. By default all files in /proc/net/stat are scanned.
.TP
.B \-i, \-\-interval <intv>
Set interval to 'intv' seconds.
...
...
@@ -37,7 +49,9 @@ Set interval to 'intv' seconds.
Display results in JSON format
.TP
.B \-k, \-\-keys k,k,k,...
Display only keys specified.
Display only keys specified. Each key \fBk\fP is of the form \fB[file:]key\fP. If \fB<file>\fP
is given, the search for the given key is limited to that file. Otherwise the first file containing
the searched key is being used.
.TP
.B \-s, \-\-subject [0-2]
Specify display of subject/header. '0' means no header at all, '1' prints a header only at start of the program and '2' prints a header every 20 lines.
...
...
@@ -66,6 +80,179 @@ Print a header at start and every 20 lines.