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