iograph
—
create HTML graphs showing network traffic
iograph |
[-i interface]
[-o outdir]
[-d datafile] |
The iograph
program collects network statistics for an
interface of the local host and stores the number of sent and received bytes
in a small binary database.
It then creates HTML pages printing the statistics for one day
(hourly display), one month (daily display) or for the past twelve month.
The HTML pages print the number of bytes sent / received together with a bar
graph.
-i
interface
- The network interface for which statistics are to be collected.
-o
outdir
- Directory where to place the resulting HTML pages.
Do not add a trailing slash!
-d
datafile
- Name of the database file.
iograph
is intended to be run as a cron job. Add the
following line to your system
crontab(8):
0 * * * * root /usr/local/bin/iograph
-i ath0 -o /usr/local/www/iograph -d /var/db/iograph.dat
Markus Dolze ⟨bsdfan@nurfuerspam.de⟩
The intended interval is one hour. If it is called more than once an hour, the
data point for the past hour is overwritten with the traffic since the last
run.
On i386 systems, FreeBSD's network counters are 32 bit long,
therefore wrapping at 4 GB. iograph
will produce
wrong results if more than 4 GB are transfered within one hour, because it
can only detect one counter wrap.