e4ebe93e71
vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won't actually be sniffing any traffic and also ensures light use of system resources. With tweaks and advices from jasper@. Thanks ok jasper@
29 lines
857 B
Plaintext
29 lines
857 B
Plaintext
$OpenBSD: README.OpenBSD,v 1.1.1.1 2010/10/25 10:14:53 pea Exp $
|
|
|
|
All the command must be launched as the user _vnstat.
|
|
|
|
1) Launch vnstat --iflist to see all the available interfaces.
|
|
|
|
2) For each interface that you want to monitor, launch this command:
|
|
# vnstat -i interface -u
|
|
This will create the database for the specified interface.
|
|
|
|
3) Edit ${SYSCONFDIR}/vnstat.conf if necessary
|
|
|
|
4) Finally launch the vnstatd daemon:
|
|
# /usr/local/sbin/vnstatd -d
|
|
|
|
5) Add the following to your ${SYSCONFDIR}/rc.local:
|
|
if [ -x /usr/local/sbin/vnstatd ]; then
|
|
echo -n ' vnstatd'
|
|
install -d -o _vnstat /var/run/vnstat
|
|
su -l _vnstat -c "/usr/local/sbin/vnstatd -d"
|
|
fi
|
|
|
|
6) Create graphics with the command vnstati
|
|
|
|
|
|
Random hints:
|
|
* You can enable debug in ${SYSCONFDIR}/vnstat.conf and check
|
|
the logs in /var/log/vnstat/vnstat.log
|