Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

~$ vnstat

                  rx      /      tx      /     total    /   estimated
wlan0:
   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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.