389 lines
9.3 KiB
HTML
389 lines
9.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of LNSTAT</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>LNSTAT</H1>
|
|
Section: Maintenance Commands (8)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
lnstat - unified linux network statistics
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>lnstat</B>
|
|
|
|
[<I>options</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This manual page documents briefly the
|
|
<B>lnstat</B>
|
|
|
|
command.
|
|
<P>
|
|
|
|
<B>lnstat</B> 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/.
|
|
<P>
|
|
|
|
Each file in /proc/net/stat/ contains a header line listing the column names.
|
|
These names are used by <B>lnstat</B> 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. <B>lnstat</B> sums these values up
|
|
(which in fact are counters) before printing them. After each interval, only
|
|
the difference to the last value is printed.
|
|
<P>
|
|
|
|
Files and columns may be selected by using the <B>-f</B> and <B>-k</B>
|
|
parameters. By default, all columns of all files are printed.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
lnstat supports the following options.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-h, --help</B>
|
|
|
|
<DD>
|
|
Show summary of options.
|
|
<DT id="2"><B>-V, --version</B>
|
|
|
|
<DD>
|
|
Show version of program.
|
|
<DT id="3"><B>-c, --count <count></B>
|
|
|
|
<DD>
|
|
Print <count> number of intervals.
|
|
<DT id="4"><B>-d, --dump</B>
|
|
|
|
<DD>
|
|
Dump list of available files/keys.
|
|
<DT id="5"><B>-f, --file <file></B>
|
|
|
|
<DD>
|
|
Statistics file to use, may be specified multiple times. By default all files in /proc/net/stat are scanned.
|
|
<DT id="6"><B>-i, --interval <intv></B>
|
|
|
|
<DD>
|
|
Set interval to 'intv' seconds.
|
|
<DT id="7"><B>-j, --json</B>
|
|
|
|
<DD>
|
|
Display results in JSON format
|
|
<DT id="8"><B>-k, --keys k,k,k,...</B>
|
|
|
|
<DD>
|
|
Display only keys specified. Each key <B>k</B> is of the form <B>[file:]key</B>. If <B><file></B>
|
|
is given, the search for the given key is limited to that file. Otherwise the first file containing
|
|
the searched key is being used.
|
|
<DT id="9"><B>-s, --subject [0-2]</B>
|
|
|
|
<DD>
|
|
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.
|
|
<DT id="10"><B>-w, --width n,n,n,...</B>
|
|
|
|
<DD>
|
|
Width for each field.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>USAGE EXAMPLES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="11"><B># lnstat -d</B>
|
|
|
|
<DD>
|
|
Get a list of supported statistics files.
|
|
<DT id="12"><B># lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys</B>
|
|
|
|
<DD>
|
|
Select the specified files and keys.
|
|
<DT id="13"><B># lnstat -i 10</B>
|
|
|
|
<DD>
|
|
Use an interval of 10 seconds.
|
|
<DT id="14"><B># lnstat -f ip_conntrack</B>
|
|
|
|
<DD>
|
|
Use only the specified file for statistics.
|
|
<DT id="15"><B># lnstat -s 0</B>
|
|
|
|
<DD>
|
|
Do not print a header at all.
|
|
<DT id="16"><B># lnstat -s 20</B>
|
|
|
|
<DD>
|
|
Print a header at start and every 20 lines.
|
|
<DT id="17"><B># lnstat -c -1 -i 1 -f rt_cache -k entries,in_hit,in_slow_tot</B>
|
|
|
|
<DD>
|
|
Display statistics for keys entries, in_hit and in_slow_tot of field rt_cache every second.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="18"><B>/proc/net/stat/arp_cache, /proc/net/stat/ndisc_cache</B>
|
|
|
|
<DD>
|
|
Statistics around neighbor cache and ARP. <B>arp_cache</B> is for IPv4, <B>ndisc_cache</B> is the same for IPv6.
|
|
<P>
|
|
<B>entries</B>
|
|
|
|
Number of entries in the neighbor table.
|
|
<P>
|
|
<B>allocs</B>
|
|
|
|
How many neighbor entries have been allocated.
|
|
<P>
|
|
<B>destroys</B>
|
|
|
|
How many neighbor entries have been removed.
|
|
<P>
|
|
<B>hash_grows</B>
|
|
|
|
How often the neighbor (hash) table was increased.
|
|
<P>
|
|
<B>lookups</B>
|
|
|
|
How many lookups were performed.
|
|
<P>
|
|
<B>hits</B>
|
|
|
|
How many <B>lookups</B> were successful.
|
|
<P>
|
|
<B>res_failed</B>
|
|
|
|
How many neighbor lookups failed.
|
|
<P>
|
|
<B>rcv_probes_mcast</B>
|
|
|
|
How many multicast neighbor solicitations were received. (IPv6 only.)
|
|
<P>
|
|
<B>rcv_probes_ucast</B>
|
|
|
|
How many unicast neighbor solicitations were received. (IPv6 only.)
|
|
<P>
|
|
<B>periodic_gc_runs</B>
|
|
|
|
How many garbage collection runs were executed.
|
|
<P>
|
|
<B>forced_gc_runs</B>
|
|
|
|
How many forced garbage collection runs were executed. Happens when adding an
|
|
entry and the table is too full.
|
|
<P>
|
|
<B>unresolved_discards</B>
|
|
|
|
How many neighbor table entries were discarded due to lookup failure.
|
|
<P>
|
|
<B>table_fulls</B>
|
|
|
|
Number of table overflows. Happens if table is full and forced GC run (see
|
|
<B>forced_gc_runs</B>) has failed.
|
|
<P>
|
|
<DT id="19"><B>/proc/net/stat/ip_conntrack, /proc/net/stat/nf_conntrack</B>
|
|
|
|
<DD>
|
|
Conntrack related counters. <B>ip_conntrack</B> is for backwards compatibility
|
|
with older userspace only and shows the same data as <B>nf_conntrack</B>.
|
|
<P>
|
|
<B>entries</B>
|
|
|
|
Number of entries in conntrack table.
|
|
<P>
|
|
<B>searched</B>
|
|
|
|
Number of conntrack table lookups performed.
|
|
<P>
|
|
<B>found</B>
|
|
|
|
Number of <B>searched</B> entries which were successful.
|
|
<P>
|
|
<B>new</B>
|
|
|
|
Number of conntrack entries added which were not expected before.
|
|
<P>
|
|
<B>invalid</B>
|
|
|
|
Number of packets seen which can not be tracked.
|
|
<P>
|
|
<B>ignore</B>
|
|
|
|
Number of packets seen which are already connected to a conntrack entry.
|
|
<P>
|
|
<B>delete</B>
|
|
|
|
Number of conntrack entries which were removed.
|
|
<P>
|
|
<B>delete_list</B>
|
|
|
|
Number of conntrack entries which were put to dying list.
|
|
<P>
|
|
<B>insert</B>
|
|
|
|
Number of entries inserted into the list.
|
|
<P>
|
|
<B>insert_failed</B>
|
|
|
|
Number of entries for which list insertion was attempted but failed (happens if
|
|
the same entry is already present).
|
|
<P>
|
|
<B>drop</B>
|
|
|
|
Number of packets dropped due to conntrack failure. Either new conntrack entry
|
|
allocation failed, or protocol helper dropped the packet.
|
|
<P>
|
|
<B>early_drop</B>
|
|
|
|
Number of dropped conntrack entries to make room for new ones, if maximum table
|
|
size was reached.
|
|
<P>
|
|
<B>icmp_error</B>
|
|
|
|
Number of packets which could not be tracked due to error situation. This is a
|
|
subset of <B>invalid</B>.
|
|
<P>
|
|
<B>expect_new</B>
|
|
|
|
Number of conntrack entries added after an expectation for them was already
|
|
present.
|
|
<P>
|
|
<B>expect_create</B>
|
|
|
|
Number of expectations added.
|
|
<P>
|
|
<B>expect_delete</B>
|
|
|
|
Number of expectations deleted.
|
|
<P>
|
|
<B>search_restart</B>
|
|
|
|
Number of conntrack table lookups which had to be restarted due to hashtable
|
|
resizes.
|
|
<P>
|
|
<DT id="20"><B>/proc/net/stat/rt_cache</B>
|
|
|
|
<DD>
|
|
Routing cache statistics.
|
|
<P>
|
|
<B>entries</B>
|
|
|
|
Number of entries in routing cache.
|
|
<P>
|
|
<B>in_hit</B>
|
|
|
|
Number of route cache hits for incoming packets. Deprecated since IP route
|
|
cache removal, therefore always zero.
|
|
<P>
|
|
<B>in_slow_tot</B>
|
|
|
|
Number of routing cache entries added for input traffic.
|
|
<P>
|
|
<B>in_slow_mc</B>
|
|
|
|
Number of multicast routing cache entries added for input traffic.
|
|
<P>
|
|
<B>in_no_route</B>
|
|
|
|
Number of input packets for which no routing table entry was found.
|
|
<P>
|
|
<B>in_brd</B>
|
|
|
|
Number of matched input broadcast packets.
|
|
<P>
|
|
<B>in_martian_dst</B>
|
|
|
|
Number of incoming martian destination packets.
|
|
<P>
|
|
<B>in_martian_src</B>
|
|
|
|
Number of incoming martian source packets.
|
|
<P>
|
|
<B>out_hit</B>
|
|
|
|
Number of route cache hits for outgoing packets. Deprecated since IP route
|
|
cache removal, therefore always zero.
|
|
<P>
|
|
<B>out_slow_tot</B>
|
|
|
|
Number of routing cache entries added for output traffic.
|
|
<P>
|
|
<B>out_slow_mc</B>
|
|
|
|
Number of multicast routing cache entries added for output traffic.
|
|
<P>
|
|
<B>gc_total</B>
|
|
|
|
Total number of garbage collection runs. Deprecated since IP route cache
|
|
removal, therefore always zero.
|
|
<P>
|
|
<B>gc_ignored</B>
|
|
|
|
Number of ignored garbage collection runs due to minimum GC interval not
|
|
reached and routing cache not full. Deprecated since IP route cache removal,
|
|
therefore always zero.
|
|
<P>
|
|
<B>gc_goal_miss</B>
|
|
|
|
Number of garbage collector goal misses. Deprecated since IP route cache
|
|
removal, therefore always zero.
|
|
<P>
|
|
<B>gc_dst_overflow</B>
|
|
|
|
Number of destination cache overflows. Deprecated since IP route cache removal,
|
|
therefore always zero.
|
|
<P>
|
|
<B>in_hlist_search</B>
|
|
|
|
Number of hash table list traversals for input traffic. Deprecated since IP
|
|
route cache removal, therefore always zero.
|
|
<P>
|
|
<B>out_hlist_search</B>
|
|
|
|
Number of hash table list traversals for output traffic. Deprecated since IP
|
|
route cache removal, therefore always zero.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ip">ip</A></B>(8)
|
|
|
|
<BR>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
lnstat was written by Harald Welte <<A HREF="mailto:laforge@gnumonks.org">laforge@gnumonks.org</A>>.
|
|
<P>
|
|
|
|
This manual page was written by Michael Prokop <<A HREF="mailto:mika@grml.org">mika@grml.org</A>> for the Debian project (but may be used by others).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="21"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="22"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="23"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="24"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="25"><A HREF="#lbAF">USAGE EXAMPLES</A><DD>
|
|
<DT id="26"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="27"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="28"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|