LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-26-2019, 03:39 AM   #1
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Slackware
Posts: 1,580
Blog Entries: 3

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Going round in circles with vnstat


I am using the Slackbuild of vnstat and I can't get it to work. I'm trying to get it to work with my wireless card.

--iflist

gives me

Code:
root@lysurfer_viii:~# vnstat --iflist
Available interfaces: wlan0 lo eth0 (65535 Mbit)
When I attempted to start vntstat or add an interface I kept being told there was no file called /var/lib/vnstat so I created it. Now, when I try to add an interface I get:

Code:
root@lysurfer_viii:~# vnstat --add -i wlan0
Error: Unable to open database "/var/lib/vnstat/vnstat.db": No such file or directory
The vnStat daemon should have created the database when started.
Check that it is configured and running. See also "man vnstatd".
Do I have to create this database file as well?

I have also created a .vnstatrc in my home folder, copied from /etc/vnstat.conf
 
Old 01-26-2019, 05:04 AM   #2
Ian M
LQ Newbie
 
Registered: Oct 2017
Posts: 15

Rep: Reputation: Disabled
Have you started the vnstat daemon before running vnstat? The daemon creates the database and needs to be running for vnstat to work, see the slackbuild page for more info https://slackbuilds.org/repository/1...?search=vnstat
 
1 members found this post helpful.
Old 01-26-2019, 08:23 AM   #3
Lysander666
Senior Member
 
Registered: Apr 2017
Location: The Underearth
Distribution: Slackware
Posts: 1,580

Original Poster
Blog Entries: 3

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
OK great, you were right. I had to use

Code:
#chmod +x /etc/rc.d/rc.vnstat
then

Code:
#/etc/rc.d/rc.vnstat start
I also added a startup to rc.local:

Code:
  # Start vnstat
  if [ -x /etc/rc.d/rc.vnstat ]; then
    /etc/rc.d/rc.vnstat start
  fi
Of course all this I would have known if I'd actually looked at the SBo page properly.

I'm on a capped connection here, hence why I need it. Amazing how much data is gobbled through streaming. This was just from a four min YouTube video:

Code:
lysander@lysplorer_iv:/etc/rc.d$ vnstat -i wlan0
Database updated: 2019-01-26 14:20:00

   wlan0 since 2019-01-26

          rx:  29.40 MiB      tx:  1.06 MiB      total:  30.46 MiB

   monthly
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
       2019-01     29.40 MiB |    1.06 MiB |   30.46 MiB |   115.00 bit/s
     ------------------------+-------------+-------------+---------------
     estimated     33.21 MiB |     --      |   33.21 MiB |

   daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
         today     29.40 MiB |    1.06 MiB |   30.46 MiB |    4.95 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated     49.22 MiB |    1.78 MiB |   51.00 MiB |
lysander@lysplorer_iv:/etc/rc.d$

Anyway, thank you. I'll keep an eye on this.

Not sure what I should pay attention to though - 'total' or the 'estimated'.

Last edited by Lysander666; 01-26-2019 at 08:50 AM.
 
Old 01-28-2019, 11:56 AM   #4
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 301

Rep: Reputation: 279Reputation: 279Reputation: 279
Quote:
Originally Posted by Lysander666 View Post
Not sure what I should pay attention to though - 'total' or the 'estimated'.
The total is the amount you've actually transferred; the estimate is the amount you'll transfer assuming you maintain the average transfer rate shown in the final column. Average transfer rates are only stable under certain conditions (as noted in the vnstat FAQ) and isn't meaningful in any real sense for a wireless adapter in a laptop, so I wouldn't worry too much about it: just monitor the total and make sure you don't exceed (or get too close to) your cap.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] vnstat -d,-w,-m all return "no data available" but vnstat works. mzsade Debian 5 01-13-2016 04:56 PM
going round in circles drfhm Linux - Software 3 05-13-2009 01:18 AM
X Development Libraries. (Am i going round in circles?) colinraff Linux - Newbie 4 05-29-2008 05:09 AM
mounting usb thumbdrive and going in circles slackist Linux - Hardware 11 07-27-2004 08:30 PM
PS2 mouse goes crazy [it goes round n round n round...] goci Linux - Hardware 2 10-09-2003 08:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration