Just another Kohod site

lnstat Man page

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 selec‐ tion 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/.

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 sta‐ tistics 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 Print number of intervals.

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

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

-i, –interval 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 is given, the search for the given key is limited to that file. Otherwise the first file containing 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.