table of contents
other versions
- jessie 3.16.0-2
- stretch 4.9.0-1+deb9u1
- testing 4.17.0-2
- stretch-backports 4.14.1-1~bpo9+1
- unstable 4.17.0-2
LNSTAT(8) | System Manager's Manual | LNSTAT(8) |
NAME¶
lnstat - unified linux network statisticsSYNOPSIS¶
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. In addition to routing cache statistics, it supports any kind of statistics the linux kernel exports via a file in /proc/net/stat/.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.
- -i, --interval <intv>
- Set interval to 'intv' seconds.
- -j, --json
- Display results in JSON format
- -k, --keys k,k,k,...
- Display only keys specified.
- -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.