Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed vnstat. I run vnstat and get this:

~$ vnstat

                  rx      /      tx      /     total    /   estimated
   Aug '12     12.89 MiB  /   14.14 MiB  /   27.03 MiB  /   37.00 MiB
     today     12.89 MiB  /   14.14 MiB  /   27.03 MiB  /      29 MiB

irda0: Not enough data available yet.
eth0: Not enough data available yet.

I'm only using wireless, and I've only just installed it, so I would expect that. However, when I run vnstat -l, it only returns stuff for eth0; wlan0 isn't present:

~$ vnstat -l
Monitoring eth0...    (press CTRL-C to stop)

   rx:        0 kbit/s     0 p/s          tx:        0 kbit/s     0 p/s^C

Similarly when I run vnstat -h (show traffic for last 24 hours), or any one of a number of other commands, it only complains about not having enough data for eth0, and doesn't try to return anything for wlan0. What's going on?

share|improve this question
up vote 0 down vote accepted

Turns out a lot of the vnstat switches only work with the default interface (in my case eth0) unless another is specified.

Specify an interface with -i, like vnstat -h -i wlan0. You can get a list of available interfaces using ifconfig.

Default interface can be specified in the config (probably in /etc/vnstat.conf).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.