1LNSTAT(8)                   System Manager's Manual                  LNSTAT(8)
2
3
4

NAME

6       lnstat - unified linux network statistics
7

SYNOPSIS

9       lnstat [options]
10

DESCRIPTION

12       This manual page documents briefly the lnstat command.
13
14       lnstat  is  a generalized and more feature-complete replacement for the
15       old rtstat program. It is commonly used to periodically print a  selec‐
16       tion  of  statistical  values  exported  by the kernel.  In addition to
17       routing cache statistics, it supports any kind of statistics the  linux
18       kernel exports via a file in /proc/net/stat/.
19
20       Each  file in /proc/net/stat/ contains a header line listing the column
21       names.  These names are used by lnstat as keys for selecting which sta‐
22       tistics  to  print. For every CPU present in the system, a line follows
23       which lists the actual values for each column of the file. lnstat  sums
24       these  values  up  (which  in  fact are counters) before printing them.
25       After each interval, only the difference to the last value is printed.
26
27       Files and columns may be selected by using the -f and -k parameters. By
28       default, all columns of all files are printed.
29

OPTIONS

31       These  programs  follow  the  usual  GNU command line syntax, with long
32       options starting with two dashes (`-').  lnstat supports the  following
33       options.
34
35       -h, --help
36              Show summary of options.
37
38       -V, --version
39              Show version of program.
40
41       -c, --count <count>
42              Print <count> number of intervals.
43
44       -d, --dump
45              Dump list of available files/keys.
46
47       -f, --file <file>
48              Statistics  file  to  use,  may  be specified multiple times. By
49              default all files in /proc/net/stat are scanned.
50
51       -i, --interval <intv>
52              Set interval to 'intv' seconds.
53
54       -k, --keys k,k,k,...
55              Display  only  keys  specified.  Each  key  k  is  of  the  form
56              [file:]key.  If <file> is given, the search for the given key is
57              limited to that file. Otherwise the first  file  containing  the
58              searched key is being used.
59
60       -s, --subject [0-2]
61              Specify  display  of subject/header. '0' means no header at all,
62              '1' prints a header only at start of the program and '2'  prints
63              a header every 20 lines.
64
65       -w, --width n,n,n,...
66              Width for each field.
67

USAGE EXAMPLES

69       # lnstat -d
70              Get a list of supported statistics files.
71
72       # lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys
73              Select the specified files and keys.
74
75       # lnstat -i 10
76              Use an interval of 10 seconds.
77
78       # lnstat -f ip_conntrack
79              Use only the specified file for statistics.
80
81       # lnstat -s 0
82              Do not print a header at all.
83
84       # lnstat -s 20
85              Print a header at start and every 20 lines.
86
87       # lnstat -c -1 -i 1 -f rt_cache -k entries,in_hit,in_slow_tot
88              Display  statistics  for keys entries, in_hit and in_slow_tot of
89              field rt_cache every second.
90
91

FILES

93       /proc/net/stat/arp_cache, /proc/net/stat/ndisc_cache
94              Statistics around neighbor cache and ARP. arp_cache is for IPv4,
95              ndisc_cache is the same for IPv6.
96
97              entries Number of entries in the neighbor table.
98
99              allocs How many neighbor entries have been allocated.
100
101              destroys How many neighbor entries have been removed.
102
103              hash_grows How often the neighbor (hash) table was increased.
104
105              lookups How many lookups were performed.
106
107              hits How many lookups were successful.
108
109              res_failed How many neighbor lookups failed.
110
111              rcv_probes_mcast  How many multicast neighbor solicitations were
112              received. (IPv6 only.)
113
114              rcv_probes_ucast How many unicast  neighbor  solicitations  were
115              received. (IPv6 only.)
116
117              periodic_gc_runs How many garbage collection runs were executed.
118
119              forced_gc_runs How many forced garbage collection runs were exe‐
120              cuted. Happens when adding an entry and the table is too full.
121
122              unresolved_discards How many neighbor table  entries  were  dis‐
123              carded due to lookup failure.
124
125              table_fulls  Number of table overflows. Happens if table is full
126              and forced GC run (see forced_gc_runs) has failed.
127
128
129       /proc/net/stat/ip_conntrack, /proc/net/stat/nf_conntrack
130              Conntrack related counters. ip_conntrack is for  backwards  com‐
131              patibility  with older userspace only and shows the same data as
132              nf_conntrack.
133
134              entries Number of entries in conntrack table.
135
136              searched Number of conntrack table lookups performed.
137
138              found Number of searched entries which were successful.
139
140              new Number of conntrack entries added which  were  not  expected
141              before.
142
143              invalid Number of packets seen which can not be tracked.
144
145              ignore  Number  of packets seen which are already connected to a
146              conntrack entry.
147
148              delete Number of conntrack entries which were removed.
149
150              delete_list Number of conntrack entries which were put to  dying
151              list.
152
153              insert Number of entries inserted into the list.
154
155              insert_failed  Number  of  entries  for which list insertion was
156              attempted but failed (happens  if  the  same  entry  is  already
157              present).
158
159              drop  Number of packets dropped due to conntrack failure. Either
160              new  conntrack  entry  allocation  failed,  or  protocol  helper
161              dropped the packet.
162
163              early_drop  Number of dropped conntrack entries to make room for
164              new ones, if maximum table size was reached.
165
166              icmp_error Number of packets wich could not be  tracked  due  to
167              error situation. This is a subset of invalid.
168
169              expect_new  Number  of conntrack entries added after an expecta‐
170              tion for them was already present.
171
172              expect_create Number of expectations added.
173
174              expect_delete Number of expectations deleted.
175
176              search_restart Number of conntrack table lookups which had to be
177              restarted due to hashtable resizes.
178
179
180       /proc/net/stat/rt_cache
181              Routing cache statistics.
182
183              entries Number of entries in routing cache.
184
185              in_hit  Number  of route cache hits for incoming packets. Depre‐
186              cated since IP route cache removal, therefore always zero.
187
188              in_slow_tot Number of routing  cache  entries  added  for  input
189              traffic.
190
191              in_slow_mc  Number  of multicast routing cache entries added for
192              input traffic.
193
194              in_no_route Number of input packets for which no  routing  table
195              entry was found.
196
197              in_brd Number of matched input broadcast packets.
198
199              in_martian_dst Number of incoming martian destination packets.
200
201              in_martian_src Number of incoming martian source packets.
202
203              out_hit  Number of route cache hits for outgoing packets. Depre‐
204              cated since IP route cache removal, therefore always zero.
205
206              out_slow_tot Number of routing cache entries  added  for  output
207              traffic.
208
209              out_slow_mc  Number of multicast routing cache entries added for
210              output traffic.
211
212              gc_total Total number of  garbage  collection  runs.  Deprecated
213              since IP route cache removal, therefore always zero.
214
215              gc_ignored Number of ignored garbage collection runs due to min‐
216              imum GC interval not reached and routing cache not full.  Depre‐
217              cated since IP route cache removal, therefore always zero.
218
219              gc_goal_miss Number of garbage collector goal misses. Deprecated
220              since IP route cache removal, therefore always zero.
221
222              gc_dst_overflow Number of destination  cache  overflows.  Depre‐
223              cated since IP route cache removal, therefore always zero.
224
225              in_hlist_search  Number  of hash table list traversals for input
226              traffic. Deprecated since  IP  route  cache  removal,  therefore
227              always zero.
228
229              out_hlist_search Number of hash table list traversals for output
230              traffic. Deprecated since  IP  route  cache  removal,  therefore
231              always zero.
232
233

SEE ALSO

235       ip(8),    and    /usr/share/doc/iproute-2.6.32/README.lnstat   (package
236       iproute-doc on Debian)
237

AUTHOR

239       lnstat was written by Harald Welte <laforge@gnumonks.org>.
240
241       This manual page was written by Michael Prokop <mika@grml.org> for  the
242       Debian project (but may be used by others).
243
244
245
246                                                                     LNSTAT(8)
Impressum