blob: 315a8e5d7a80eafaae1dcf90da3127692acec788 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.TH LNSTAT 8
2.SH NAME
3lnstat \- unified linux network statistics
4.SH SYNOPSIS
5.B lnstat
6.RI [ options ]
7.SH DESCRIPTION
8This manual page documents briefly the
9.B lnstat
10command.
11.PP
12\fBlnstat\fP is a generalized and more feature-complete replacement for the old rtstat program.
13In addition to routing cache statistics, it supports any kind of statistics the linux kernel
14exports via a file in /proc/net/stat/.
15.SH OPTIONS
16These programs follow the usual GNU command line syntax, with long
17options starting with two dashes (`-').
18lnstat supports the following options.
19.TP
20.B \-h, \-\-help
21Show summary of options.
22.TP
23.B \-V, \-\-version
24Show version of program.
25.TP
26.B \-c, \-\-count <count>
27Print <count> number of intervals.
28.TP
29.B \-d, \-\-dump
30Dump list of available files/keys.
31.TP
32.B \-f, \-\-file <file>
33Statistics file to use.
34.TP
35.B \-i, \-\-interval <intv>
36Set interval to 'intv' seconds.
37.TP
38.B \-k, \-\-keys k,k,k,...
39Display only keys specified.
40.TP
41.B \-s, \-\-subject [0-2]
42Specify 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.
43.TP
44.B \-w, \-\-width n,n,n,...
45Width for each field.
46.SH USAGE EXAMPLES
47.TP
48.B # lnstat -d
49Get a list of supported statistics files.
50.TP
51.B # lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys
52Select the specified files and keys.
53.TP
54.B # lnstat -i 10
55Use an interval of 10 seconds.
56.TP
57.B # lnstat -f ip_conntrack
58Use only the specified file for statistics.
59.TP
60.B # lnstat -s 0
61Do not print a header at all.
62.TP
63.B # lnstat -s 20
64Print a header at start and every 20 lines.
65.TP
66.B # lnstat -c -1 -i 1 -f rt_cache -k entries,in_hit,in_slow_tot
67Display statistics for keys entries, in_hit and in_slow_tot of field rt_cache every second.
68.SH SEE ALSO
69.BR ip (8),
70and /usr/share/doc/iproute-doc/README.lnstat (package iproute-doc on Debian)
71.br
72.SH AUTHOR
73lnstat was written by Harald Welte <laforge@gnumonks.org>.
74.PP
75This manual page was written by Michael Prokop <mika@grml.org> for the Debian project (but may be used by others).