Define the server were pkg_add gets it packages from. As the line indicates it is for OpenBSD 4.5.
Install the wget package to be able to download the vnstat sources.
Retrieve the source tar ball.
Unpack the tar ball verbosely.
tar xvfz vnstat-1.10.tar.gz
Now change to the extracted directory.
Install package gmake to be able to compile the stuff.
Compile the sources - binary is created in subdirectory "src".
gmake -C src vnstat
Copy the generated binary to a place found in $PATH.
cp src/vnstat /usr/bin/.
Create the directory for vnstats collected data
Initialize the interface vnstat has to collect for
vnstat -u -i
And add a line to your crontab:
*/5 * * * * /usr/bin/vnstat -u
Don't forget restart/SIGHUP the cron daemon.
Wait a few minutes to give vnstat the chance to collect data and try
That's all - did it work for you? Just drop your comments here.