Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: Nokia390 on April 30, 2009, 12:44:26 AM
-
hi all
i have a problem with vnstat
it works only eth0, eth1 (external) apeers but 0 trafic.
thanks
(sme - server and gateway)
-
Hi, did you create the db file?
vnstat -u -i eth1
-
yes, i do
vnstat -u -i eth0
vnstat -u -i eth1
and in the moment apeers both trafic.
the only way its make a cron job, every hour with:
vnstat -u -i eth0
vnstat -u -i eth1
and it works
thanks
-
it works, put the cron job
-
When you install the application, it automatically installs the cron job.
All you have to do is add the interface to the database using the above commands.
After that you can see what the captured traffic was:
router:~# vnstat --help
vnStat 1.6 by Teemu Toivola <tst at iki dot fi>
-q, --query query database
-h, --hours show hours
-d, --days show days
-m, --months show months
-w, --weeks show weeks
-t, --top10 show top10
-s, --short use short output
-u, --update update database
-i, --iface select interface (default: eth0)
-?, --help short help
-v, --version show version
-tr, --traffic calculate traffic
-l, --live show transfer rate in real time
See also "--longhelp" for complete options list and "man vnstat".
router:~# cat /etc/cron.d/vnstat
# /etc/cron.d/vnstat: crontab entries for the vnstat package
0-55/5 * * * * root if [ -x /usr/bin/vnstat ] && [ `ls /var/lib/vnstat/ | wc -l` -ge 1 ]; then /usr/bin/vnstat -u; fi
-
thanks