|-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 firstname.lastname@example.org .