Blame man/man8/lnstat.8

Packit Service 3880ab
.TH LNSTAT 8
Packit Service 3880ab
.SH NAME
Packit Service 3880ab
lnstat \- unified linux network statistics
Packit Service 3880ab
.SH SYNOPSIS
Packit Service 3880ab
.B lnstat
Packit Service 3880ab
.RI [ options ]
Packit Service 3880ab
.SH DESCRIPTION
Packit Service 3880ab
This manual page documents briefly the
Packit Service 3880ab
.B lnstat
Packit Service 3880ab
command.
Packit Service 3880ab
.PP
Packit Service 3880ab
\fBlnstat\fP is a generalized and more feature-complete replacement for the old
Packit Service 3880ab
rtstat program. It is commonly used to periodically print a selection of
Packit Service 3880ab
statistical values exported by the kernel.
Packit Service 3880ab
In addition to routing cache statistics, it supports any kind of statistics the
Packit Service 3880ab
linux kernel exports via a file in /proc/net/stat/.
Packit Service 3880ab
.PP
Packit Service 3880ab
Each file in /proc/net/stat/ contains a header line listing the column names.
Packit Service 3880ab
These names are used by \fBlnstat\fP as keys for selecting which statistics to
Packit Service 3880ab
print. For every CPU present in the system, a line follows which lists the
Packit Service 3880ab
actual values for each column of the file. \fBlnstat\fP sums these values up
Packit Service 3880ab
(which in fact are counters) before printing them. After each interval, only
Packit Service 3880ab
the difference to the last value is printed.
Packit Service 3880ab
.PP
Packit Service 3880ab
Files and columns may be selected by using the \fB-f\fP and \fB-k\fP
Packit Service 3880ab
parameters. By default, all columns of all files are printed.
Packit Service 3880ab
.SH OPTIONS
Packit Service 3880ab
lnstat supports the following options.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-h, \-\-help
Packit Service 3880ab
Show summary of options.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-V, \-\-version
Packit Service 3880ab
Show version of program.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-c, \-\-count <count>
Packit Service 3880ab
Print <count> number of intervals.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-d, \-\-dump
Packit Service 3880ab
Dump list of available files/keys.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-f, \-\-file <file>
Packit Service 3880ab
Statistics file to use, may be specified multiple times. By default all files in /proc/net/stat are scanned.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-i, \-\-interval <intv>
Packit Service 3880ab
Set interval to 'intv' seconds.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-j, \-\-json
Packit Service 3880ab
Display results in JSON format
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-k, \-\-keys k,k,k,...
Packit Service 3880ab
Display only keys specified. Each key \fBk\fP is of the form \fB[file:]key\fP. If \fB<file>\fP
Packit Service 3880ab
is given, the search for the given key is limited to that file. Otherwise the first file containing
Packit Service 3880ab
the searched key is being used.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-s, \-\-subject [0-2]
Packit Service 3880ab
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.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B \-w, \-\-width n,n,n,...
Packit Service 3880ab
Width for each field.
Packit Service 3880ab
.SH USAGE EXAMPLES
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -d
Packit Service 3880ab
Get a list of supported statistics files.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys
Packit Service 3880ab
Select the specified files and keys.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -i 10
Packit Service 3880ab
Use an interval of 10 seconds.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -f ip_conntrack
Packit Service 3880ab
Use only the specified file for statistics.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -s 0
Packit Service 3880ab
Do not print a header at all.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -s 20
Packit Service 3880ab
Print a header at start and every 20 lines.
Packit Service 3880ab
.TP
Packit Service 3880ab
.B # lnstat -c -1 -i 1 -f rt_cache -k entries,in_hit,in_slow_tot
Packit Service 3880ab
Display statistics for keys entries, in_hit and in_slow_tot of field rt_cache every second.
Packit Service 3880ab
Packit Service 3880ab
.SH FILES
Packit Service 3880ab
.TP
Packit Service 3880ab
.B /proc/net/stat/arp_cache, /proc/net/stat/ndisc_cache
Packit Service 3880ab
Statistics around neighbor cache and ARP. \fBarp_cache\fP is for IPv4, \fBndisc_cache\fP is the same for IPv6.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B entries
Packit Service 3880ab
Number of entries in the neighbor table.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B allocs
Packit Service 3880ab
How many neighbor entries have been allocated.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B destroys
Packit Service 3880ab
How many neighbor entries have been removed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B hash_grows
Packit Service 3880ab
How often the neighbor (hash) table was increased.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B lookups
Packit Service 3880ab
How many lookups were performed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B hits
Packit Service 3880ab
How many \fBlookups\fP were successful.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B res_failed
Packit Service 3880ab
How many neighbor lookups failed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B rcv_probes_mcast
Packit Service 3880ab
How many multicast neighbor solicitations were received. (IPv6 only.)
Packit Service 3880ab
.sp
Packit Service 3880ab
.B rcv_probes_ucast
Packit Service 3880ab
How many unicast neighbor solicitations were received. (IPv6 only.)
Packit Service 3880ab
.sp
Packit Service 3880ab
.B periodic_gc_runs
Packit Service 3880ab
How many garbage collection runs were executed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B forced_gc_runs
Packit Service 3880ab
How many forced garbage collection runs were executed. Happens when adding an
Packit Service 3880ab
entry and the table is too full.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B unresolved_discards
Packit Service 3880ab
How many neighbor table entries were discarded due to lookup failure.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B table_fulls
Packit Service 3880ab
Number of table overflows. Happens if table is full and forced GC run (see
Packit Service 3880ab
\fBforced_gc_runs\fP) has failed.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.B /proc/net/stat/ip_conntrack, /proc/net/stat/nf_conntrack
Packit Service 3880ab
Conntrack related counters. \fBip_conntrack\fP is for backwards compatibility
Packit Service 3880ab
with older userspace only and shows the same data as \fBnf_conntrack\fP.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B entries
Packit Service 3880ab
Number of entries in conntrack table.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B searched
Packit Service 3880ab
Number of conntrack table lookups performed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B found
Packit Service 3880ab
Number of \fBsearched\fP entries which were successful.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B new
Packit Service 3880ab
Number of conntrack entries added which were not expected before.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B invalid
Packit Service 3880ab
Number of packets seen which can not be tracked.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B ignore
Packit Service 3880ab
Number of packets seen which are already connected to a conntrack entry.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B delete
Packit Service 3880ab
Number of conntrack entries which were removed.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B delete_list
Packit Service 3880ab
Number of conntrack entries which were put to dying list.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B insert
Packit Service 3880ab
Number of entries inserted into the list.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B insert_failed
Packit Service 3880ab
Number of entries for which list insertion was attempted but failed (happens if
Packit Service 3880ab
the same entry is already present).
Packit Service 3880ab
.sp
Packit Service 3880ab
.B drop
Packit Service 3880ab
Number of packets dropped due to conntrack failure. Either new conntrack entry
Packit Service 3880ab
allocation failed, or protocol helper dropped the packet.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B early_drop
Packit Service 3880ab
Number of dropped conntrack entries to make room for new ones, if maximum table
Packit Service 3880ab
size was reached.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B icmp_error
Packit Service 3880ab
Number of packets which could not be tracked due to error situation. This is a
Packit Service 3880ab
subset of \fBinvalid\fP.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B expect_new
Packit Service 3880ab
Number of conntrack entries added after an expectation for them was already
Packit Service 3880ab
present.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B expect_create
Packit Service 3880ab
Number of expectations added.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B expect_delete
Packit Service 3880ab
Number of expectations deleted.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B search_restart
Packit Service 3880ab
Number of conntrack table lookups which had to be restarted due to hashtable
Packit Service 3880ab
resizes.
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.B /proc/net/stat/rt_cache
Packit Service 3880ab
Routing cache statistics.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B entries
Packit Service 3880ab
Number of entries in routing cache.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_hit
Packit Service 3880ab
Number of route cache hits for incoming packets. Deprecated since IP route
Packit Service 3880ab
cache removal, therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_slow_tot
Packit Service 3880ab
Number of routing cache entries added for input traffic.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_slow_mc
Packit Service 3880ab
Number of multicast routing cache entries added for input traffic.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_no_route
Packit Service 3880ab
Number of input packets for which no routing table entry was found.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_brd
Packit Service 3880ab
Number of matched input broadcast packets.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_martian_dst
Packit Service 3880ab
Number of incoming martian destination packets.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_martian_src
Packit Service 3880ab
Number of incoming martian source packets.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B out_hit
Packit Service 3880ab
Number of route cache hits for outgoing packets. Deprecated since IP route
Packit Service 3880ab
cache removal, therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B out_slow_tot
Packit Service 3880ab
Number of routing cache entries added for output traffic.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B out_slow_mc
Packit Service 3880ab
Number of multicast routing cache entries added for output traffic.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B gc_total
Packit Service 3880ab
Total number of garbage collection runs. Deprecated since IP route cache
Packit Service 3880ab
removal, therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B gc_ignored
Packit Service 3880ab
Number of ignored garbage collection runs due to minimum GC interval not
Packit Service 3880ab
reached and routing cache not full. Deprecated since IP route cache removal,
Packit Service 3880ab
therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B gc_goal_miss
Packit Service 3880ab
Number of garbage collector goal misses. Deprecated since IP route cache
Packit Service 3880ab
removal, therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B gc_dst_overflow
Packit Service 3880ab
Number of destination cache overflows. Deprecated since IP route cache removal,
Packit Service 3880ab
therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B in_hlist_search
Packit Service 3880ab
Number of hash table list traversals for input traffic. Deprecated since IP
Packit Service 3880ab
route cache removal, therefore always zero.
Packit Service 3880ab
.sp
Packit Service 3880ab
.B out_hlist_search
Packit Service 3880ab
Number of hash table list traversals for output traffic. Deprecated since IP
Packit Service 3880ab
route cache removal, therefore always zero.
Packit Service 3880ab
Packit Service 3880ab
.SH SEE ALSO
Packit Service 3880ab
.BR ip (8)
Packit Service 3880ab
.br
Packit Service 3880ab
.SH AUTHOR
Packit Service 3880ab
lnstat was written by Harald Welte <laforge@gnumonks.org>.
Packit Service 3880ab
.PP
Packit Service 3880ab
This manual page was written by Michael Prokop <mika@grml.org> for the Debian project (but may be used by others).