TRAFSTATD(8)

NAME

trafstatd - ip traffic statistics daemon.

SYNOPSIS

trafstatd [-V] [-L logfile]

DESCRIPTION

TrafStatD daemon allow remote requests of the current traffic statistic, collected via trafd (see trafd(8)).

Client program for trafstatd is named trafstat (see trafstat(1)). The telnet program (see telnet(1)) can use as an alternative client.

  Usage
Trafstatd is normally invoked by the internet server (see inetd(8)) for requests to connect to the selected port (for example, 150) as indicated by the /etc/services file (see services(5)). If you run trafstatd manually, it display error message. Run trafstatd with -V option for display version number.

  Installation
After compilation and installation BPFT programs do following steps:

1.  Add line to /etc/services for use some (not used by other application) tcp port for incoming connections to trafstatd, for example:

    trafstat 150/tcp # network traffic statistic

2.  Add line to /etc/inetd.conf for invoke trafstatd from inetd for incoming connections to trafstat tcp port, for example:

    trafstat stream tcp nowait root /usr/local/bin/trafstatd trafstatd

3.  Force inetd to re-read config file:

    killall -HUP inetd

    (or kill -1 with the PID number of the inetd)

  Retrieve current traffic statistic.
Run the trafstat program (see trafstat(1)) for connect to trafstat port or run the “ telnet host port ” (see telnet(1)) and put the string of command line parameters to remote trafstat.

OPTIONS

-L logfile
    Write log messages to file logfile

-V  Print version number and exit.

EXIT STATUS

-1  error (run not from inetd, trafstat not found, call error or illegal command line parameter)

1   Normal return where called from inetd

0   Normal return where called vith -V option from command line.

FILES
/var/log/trafstat.log
    log file.

/usr/local/bin/trafstat
    program for show traffic statistic, called from trafstatd.

COMPATIBILITY
Tested on: BSDI BSD/386 1.0 (BPFT versions 1.0-2.0), FreeBSD 2.2.8 (BPFT version 2.0), FreeBSD 3.0 and above, FreeBSD 4.0 and above (BPFT version 3.0 and above).

BPFT versions 3.*, 4.* work only on FreeBSD 3.0 and above: requred library pcap (see pcap(3)) don't present in previous versions of the FreeBSD

SEE ALSO
trafstat(1), trafd(8), traflog(1), trafshow(1), bpf(4).

AUTHORS
Vladimir Vorobyev <bob@turbo.nsk.su>
    autor of the BPFT project, versions 1.0..2.0
Vitaly V. Belekhov <vitaly@riss-telecom.ru>
    3.0 release
Stas Degteff <g@grumbler.org>
    4.0 release, man pages