# phpman > man > rtstat(8)

[LNSTAT(8)](https://www.chedong.com/phpMan.php/man/LNSTAT/8/markdown)                              System Manager's Manual                             [LNSTAT(8)](https://www.chedong.com/phpMan.php/man/LNSTAT/8/markdown)



## NAME
       lnstat - unified linux network statistics

## SYNOPSIS
       **lnstat** [_options_]

## DESCRIPTION
       This manual page documents briefly the **lnstat** command.

       **lnstat**  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 ker‐
       nel.   In  addition to routing cache statistics, it supports any kind of statistics the linux
       kernel exports via a file in /proc/net/stat/.

       Each file in /proc/net/stat/ contains a header line listing the column  names.   These  names
       are  used by **lnstat** 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.  **lnstat**
       sums  these values up (which in fact are counters) before printing them. After each interval,
       only the difference to the last value is printed.

       Files and columns may be selected by using the **-f** and **-k** parameters. By default, all  columns
       of all files are printed.

## OPTIONS
       lnstat supports the following options.

### -h, --help
              Show summary of options.

### -V, --version
              Show version of program.

### -c, --count <count>
              Print <count> number of intervals.

### -d, --dump
              Dump list of available files/keys.

### -f, --file <file>
              Statistics  file  to  use,  may  be  specified multiple times. By default all files in
              /proc/net/stat are scanned.

### -i, --interval <intv>
              Set interval to 'intv' seconds.

### -j, --json
              Display results in JSON format

### -k, --keys k,k,k,...
              Display only keys specified. Each key **k** is of the form **[file:]key**. If **<file>** is given,
              the  search  for  the given key is limited to that file. Otherwise the first file con‐
              taining the searched key is being used.

### -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.

### -w, --width n,n,n,...
              Width for each field.

## USAGE EXAMPLES
### # lnstat -d
              Get a list of supported statistics files.

       **#** **lnstat** **-k** **arp**___**cache:entries,rt**___**cache:in**___**hit,arp**___**cache:destroys**
              Select the specified files and keys.

### # lnstat -i 10
              Use an interval of 10 seconds.

       **#** **lnstat** **-f** **ip**___**conntrack**
              Use only the specified file for statistics.

### # lnstat -s 0
              Do not print a header at all.

### # lnstat -s 20
              Print a header at start and every 20 lines.

       **#** **lnstat** **-c** **-1** **-i** **1** **-f** **rt**___**cache** **-k** **entries,in**___**hit,in**___**slow**___**tot**
              Display  statistics  for  keys entries, in_hit and in_slow_tot of field rt_cache every
              second.


## FILES
       **/proc/net/stat/arp**___**cache,** **/proc/net/stat/ndisc**___**cache**
              Statistics around neighbor cache and ARP. **arp**___**cache** is for IPv4,  **ndisc**___**cache**  is  the
              same for IPv6.

              **entries** Number of entries in the neighbor table.

              **allocs** How many neighbor entries have been allocated.

              **destroys** How many neighbor entries have been removed.

              **hash**___**grows** How often the neighbor (hash) table was increased.

              **lookups** How many lookups were performed.

              **hits** How many **lookups** were successful.

              **res**___**failed** How many neighbor lookups failed.

              **rcv**___**probes**___**mcast** How many multicast neighbor solicitations were received. (IPv6 only.)

              **rcv**___**probes**___**ucast** How many unicast neighbor solicitations were received. (IPv6 only.)

              **periodic**___**gc**___**runs** How many garbage collection runs were executed.

              **forced**___**gc**___**runs**  How  many  forced  garbage collection runs were executed. Happens when
              adding an entry and the table is too full.

              **unresolved**___**discards** How many neighbor table entries were discarded due to lookup fail‐
              ure.

              **table**___**fulls** Number of table overflows. Happens if table is full and forced GC run (see
              **forced**___**gc**___**runs**) has failed.


       **/proc/net/stat/ip**___**conntrack,** **/proc/net/stat/nf**___**conntrack**
              Conntrack related counters. **ip**___**conntrack** is for  backwards  compatibility  with  older
              userspace only and shows the same data as **nf**___**conntrack**.

              **entries** Number of entries in conntrack table.

              **searched** Number of conntrack table lookups performed.

              **found** Number of **searched** entries which were successful.

              **new** Number of conntrack entries added which were not expected before.

              **invalid** Number of packets seen which can not be tracked.

              **ignore** Number of packets seen which are already connected to a conntrack entry.

              **delete** Number of conntrack entries which were removed.

              **delete**___**list** Number of conntrack entries which were put to dying list.

              **insert** Number of entries inserted into the list.

              **insert**___**failed**  Number  of  entries  for  which list insertion was attempted but failed
              (happens if the same entry is already present).

              **drop** Number of packets dropped due to conntrack failure. Either  new  conntrack  entry
              allocation failed, or protocol helper dropped the packet.

              **early**___**drop**  Number  of dropped conntrack entries to make room for new ones, if maximum
              table size was reached.

              **icmp**___**error** Number of packets which could not be tracked due to error  situation.  This
              is a subset of **invalid**.

              **expect**___**new** Number of conntrack entries added after an expectation for them was already
              present.

              **expect**___**create** Number of expectations added.

              **expect**___**delete** Number of expectations deleted.

              **search**___**restart** Number of conntrack table lookups which had  to  be  restarted  due  to
              hashtable resizes.


       **/proc/net/stat/rt**___**cache**
              Routing cache statistics.

              **entries** Number of entries in routing cache.

              **in**___**hit**  Number  of  route  cache  hits for incoming packets. Deprecated since IP route
              cache removal, therefore always zero.

              **in**___**slow**___**tot** Number of routing cache entries added for input traffic.

              **in**___**slow**___**mc** Number of multicast routing cache entries added for input traffic.

              **in**___**no**___**route** Number of input packets for which no routing table entry was found.

              **in**___**brd** Number of matched input broadcast packets.

              **in**___**martian**___**dst** Number of incoming martian destination packets.

              **in**___**martian**___**src** Number of incoming martian source packets.

              **out**___**hit** Number of route cache hits for outgoing packets.  Deprecated  since  IP  route
              cache removal, therefore always zero.

              **out**___**slow**___**tot** Number of routing cache entries added for output traffic.

              **out**___**slow**___**mc** Number of multicast routing cache entries added for output traffic.

              **gc**___**total**  Total number of garbage collection runs. Deprecated since IP route cache re‐
              moval, therefore always zero.

              **gc**___**ignored** 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.

              **gc**___**goal**___**miss** Number of garbage collector goal misses. Deprecated since IP route  cache
              removal, therefore always zero.

              **gc**___**dst**___**overflow** Number of destination cache overflows. Deprecated since IP route cache
              removal, therefore always zero.

              **in**___**hlist**___**search** Number of hash table list traversals  for  input  traffic.  Deprecated
              since IP route cache removal, therefore always zero.

              **out**___**hlist**___**search**  Number  of hash table list traversals for output traffic. Deprecated
              since IP route cache removal, therefore always zero.


## SEE ALSO
       [**ip**(8)](https://www.chedong.com/phpMan.php/man/ip/8/markdown)

## AUTHOR
       lnstat was written by Harald Welte <<laforge@gnumonks.org>>.

       This manual page was written by Michael Prokop <<mika@grml.org>> for the  Debian  project  (but
       may be used by others).



                                                                                           [LNSTAT(8)](https://www.chedong.com/phpMan.php/man/LNSTAT/8/markdown)
