trafstatd —
ip traffic statistics
daemon.
trafstatd |
[-V] [-L
logfile]
|
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.
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.
After compilation and installation BPFT programs do following
steps:
- 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
- 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/sbin/trafstatd trafstatd
- Force inetd to re-read config file:
killall -HUP inetd
(or kill -1 with the PID number of the
inetd)
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.
-L
logfile
- Write log messages to file logfile
-V
- Print version number and exit.
- -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.
/var/log/trafstat.log
log file.
/usr/local/bin/trafstat
program for show traffic statistic,
called from trafstatd.
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
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