Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  NIFMON (8)


nifmon - display network interface status, statistics and data




nifmon [-b] [-e expr] [-i if] [-r tty] [-t term]


nifmon is a curses application which displays counters and statistics of one particular network interface in one part of the screen and a stripped down tcpdump(8) output for this interface in the other part of the screen.

It is intended to be run in background on an unused syscons(4) or pcvt(4) virtual terminal to monitor a tun(4) interface used with ppp(8) with an ADSL line but can also be started as a normal program to monitor any other network interface.

The following options are available:
-b selects background mode of operation, note that specifying options -t and -r is mandatory with this mode.
-e specify a filter expression to be used with tcpdump.
-i select the interface to be monitored (default is lo0).
-r select the device file of a virtual terminal to which output is redirected.
-t specify the terminal type (i.e. vt220, cons25, pcvt25) for the terminal selected with the -r option.

Following is a description of the various displayed fields from top to bottom:
.Br In the first line the interfaces IP address, hostname and either the destination address (for point-to-point links) or broadcast address is displayed followed by a line of the last administrative change time and the previous administrative change time and the hour, minutes and seconds how long these lasted (i wanted to know how long the dynamic IP addresses i got from my provider were in effect).

Then come two lines with the number of bytes in and out and the number of packets in and out for this interface.

After that you get statistics: the number of bytes and packets in and out for the last second, minute and hour.

In the lower half of the screen an (adjusted and mangled) output of tcpdump running on that interface can be seen (i just wanted to get a very rough idea what is happening on that interface). A filter expression (i.e. "ip") for this tcpdump can be specified on the commandline using the -e switch.

To get the most needed information available from tcpdump, its output is modified as follows: only lines starting with a timestamp are displayed, the date is removed from the timestamp, the own hostname is removed and the strings [tcp sum ok] and [udp sum ok] are removed.




The whole thing started as a hack, a fact which can be seen at many places in the source. The pipe interface to run tcpdump is a bit strange, when nifmon is killed or abnormally terminated, the forked tcpdump will have to be terminated manually. Suggestions, hints and patches welcome.


The command:
nifmon -b -itun1 -r/dev/ttyv2 -tpcvt25h

monitors interface tun1 in background mode on virtual terminal /dev/ttyv2 with a terminal type of pcvt25h (for the pcvt driver).


The nifmon utility and this manpage were written by
.An Hellmuth Michaelis Aq .
Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.