<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style>
table.head, table.foot { width: 100%; }
td.head-rtitle, td.foot-os { text-align: right; }
td.head-vol { text-align: center; }
table.foot td { width: 50%; }
table.head td { width: 33%; }
div.spacer { margin: 1em 0; }
</style>
<title>
LNSTAT(8)</title>
</head>
<body>
<div class="mandoc">
<table class="head">
<tbody>
<tr>
<td class="head-ltitle">
LNSTAT(8)</td>
<td class="head-vol">
System Manager's Manual</td>
<td class="head-rtitle">
LNSTAT(8)</td>
</tr>
</tbody>
</table>
<div class="section">
<h1>NAME</h1> lnstat - unified linux network statistics</div>
<div class="section">
<h1>SYNOPSIS</h1> <b>lnstat</b> [<i>options</i>]</div>
<div class="section">
<h1>DESCRIPTION</h1> This manual page documents briefly the <b>lnstat</b> command.<div class="spacer">
</div>
<b>lnstat</b> 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/.</div>
<div class="section">
<h1>OPTIONS</h1> lnstat supports the following options.<dl>
<dt>
<b>-h, --help</b></dt>
<dd>
Show summary of options.</dd>
</dl>
<dl>
<dt>
<b>-V, --version</b></dt>
<dd>
Show version of program.</dd>
</dl>
<dl>
<dt>
<b>-c, --count &lt;count&gt;</b></dt>
<dd>
Print &lt;count&gt; number of intervals.</dd>
</dl>
<dl>
<dt>
<b>-d, --dump</b></dt>
<dd>
Dump list of available files/keys.</dd>
</dl>
<dl>
<dt>
<b>-f, --file &lt;file&gt;</b></dt>
<dd>
Statistics file to use.</dd>
</dl>
<dl>
<dt>
<b>-i, --interval &lt;intv&gt;</b></dt>
<dd>
Set interval to 'intv' seconds.</dd>
</dl>
<dl>
<dt>
<b>-j, --json</b></dt>
<dd>
Display results in JSON format</dd>
</dl>
<dl>
<dt>
<b>-k, --keys k,k,k,...</b></dt>
<dd>
Display only keys specified.</dd>
</dl>
<dl>
<dt>
<b>-s, --subject [0-2]</b></dt>
<dd>
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.</dd>
</dl>
<dl>
<dt>
<b>-w, --width n,n,n,...</b></dt>
<dd>
Width for each field.</dd>
</dl>
</div>
<div class="section">
<h1>USAGE EXAMPLES</h1><dl>
<dt>
<b># lnstat -d</b></dt>
<dd>
Get a list of supported statistics files.</dd>
</dl>
<dl>
<dt>
<b># lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys</b></dt>
<dd>
Select the specified files and keys.</dd>
</dl>
<dl>
<dt>
<b># lnstat -i 10</b></dt>
<dd>
Use an interval of 10 seconds.</dd>
</dl>
<dl>
<dt>
<b># lnstat -f ip_conntrack</b></dt>
<dd>
Use only the specified file for statistics.</dd>
</dl>
<dl>
<dt>
<b># lnstat -s 0</b></dt>
<dd>
Do not print a header at all.</dd>
</dl>
<dl>
<dt>
<b># lnstat -s 20</b></dt>
<dd>
Print a header at start and every 20 lines.</dd>
</dl>
<dl>
<dt>
<b># lnstat -c -1 -i 1 -f rt_cache -k entries,in_hit,in_slow_tot</b></dt>
<dd>
Display statistics for keys entries, in_hit and in_slow_tot of field rt_cache every second.</dd>
</dl>
</div>
<div class="section">
<h1>SEE ALSO</h1> <b>ip</b>(8), and /usr/share/doc/iproute-doc/README.lnstat (package iproute-doc on Debian)<div style="height: 0.00em;">
&#160;</div>
</div>
<div class="section">
<h1>AUTHOR</h1> lnstat was written by Harald Welte &lt;laforge@gnumonks.org&gt;.<div class="spacer">
</div>
This manual page was written by Michael Prokop &lt;mika@grml.org&gt; for the Debian project (but may be used by others).</div>
<table class="foot">
<tr>
<td class="foot-date">
</td>
<td class="foot-os">
</td>
</tr>
</table>
</div>
</body>
</html>

