[SOLVED] vnstat: “Zero database found, exiting”

I am using Ubuntu 10.10 Maverick Meerkat and I installed vnstat v1.10-1 from the terminal using apt-get:

sudo apt-get install vnstat

The installation ended with an error:

* Starting vnStat daemon vnstatd Zero database found, exiting.

When I tried to monitor my traffic using the following command:

vnstat -m -i eth0

I got the following error:

Error: Unable to read database “/var/lib/vnstat/eth0”.

Then I ran vnstat from the command line and got the following:

No database found, nothing to do. Use –help for help.
A new database can be created with the following command:

vnstat -u -i eth0
Replace ‘eth0’ with the interface that should be monitored.
The following interfaces are currently available:

lo eth0 vboxnet0

Since my computer is using eth0, I created a database for eth0 using the following command:

sudo vnstat -u -i eth0

I got the following output:

Error: Unable to read database “/var/lib/vnstat/eth0”.

Info: -> A new database has been created.

Now, I am able to monitor my Internet traffic using vnstat.

  • Pingback: [HOWTO] Display daily/weekly/monthly Internet Traffic totals on the Desktop using Conky | The _khAttAm_ blog()

  • dRewsus

    Those twitter and whatever-the-other- one-on-the-right-side-was bars on the sides are the biggest pain in the ass for reading your articles on a netbook.

    • Thanks for the feedback, I will consider removing/replacing them.

      • dRewsus

        I feel my comment could have been more constructive. First of all, thank you for this and other informative posts.
        Now, maybe think of a way that the article content could have sufficient borders/margins when the resolution is small so those boxes dont cover the content.
        I have no right to say REMOVE them just because I dont use those services. I know a lot of people do, and they do look neat on the side there.

        • I use widescreen and I did not realize those would cover the article contents in smaller resolutions. Thanks again for bringing it to my notice.

  • drapko

    Thank you! It worked on FreeBSD 10.1 🙂

    • Glad that a four year old blog post is still helping someone. Makes me want to continue writing again.