1 lnstat - linux networking statistics
2 (C) 2004 Harald Welte <laforge@gnumonks.org
3 ======================================================================
5 This tool is a generalized and more feature-complete replacement for the old
8 In addition to routing cache statistics, it supports any kind of statistics
9 the linux kernel exports via a file in /proc/net/stat. In a stock 2.6.9
11 per-protocol neighbour cache statistics
12 (ipv4, ipv6, atm, decnet)
13 routing cache statistics
15 connection tracking statistics
18 Please note that lnstat will adopt to any additional statistics that might be
19 added to the kernel at some later point
21 I personally always like examples more than any reference documentation, so I
22 list the following examples. If somebody wants to do a manpage, feel free
27 In order to get a list of supported statistics files, you can run
31 It will display something like
33 /proc/net/stat/arp_cache:
38 /proc/net/stat/rt_cache:
43 You can now select the files/keys you are interested by something like
45 lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys
47 arp_cach|rt_cache|arp_cach|
48 entries| in_hit|destroys|
54 You can specify the interval (e.g. 10 seconds) by:
58 You can specify to only use one particular statistics file:
60 lnstat -f ip_conntrack
62 You can specify individual field widths
64 lnstat -k arp_cache:entries,rt_cache:entries -w 20,8
66 You can specify not to print a header at all
70 You can specify to print a header only at start of the program
74 You can specify to print a header at start and every 20 lines:
78 You can specify the number of samples you want to take (e.g. 5):