Results 1 to 3 of 3

Thread: vnstat stopped working?

  1. #1

    Default vnstat stopped working?

    Anyone else have vnstat just stop working? It stopped working for me a few months ago and I can't figure out why. I've tried wiping the database and starting over but it still doesn't see any traffic. Even when I try `vnstat -tr`, and download a file from the server, it still says there is no traffic.

    I digged through the source a bit and saw briefly that it is pulling the traffic from /proc/net/dev. I've done this test looking at /proc/net/dev directly and it is recording the traffic properly. Running the traffic test in debug mode I see it is pulling /proc/net/dev properly, and it is getting the packet changes and packet/sec values properly. The kB/s values though remain 0.

    Code:
    fade net # vnstat -D -tr
    arg 1: "-D"
    arg 2: "-tr"
    
    venet0:6400261140 14752344    0    0    0     0          0         0 12137043763 20328045    0    0    0     0       0          0
    
    
    btime 1181087058
    
           0 '6400261140' -> '4294967295'
           1 '14752344' -> '14752344'
           2 '0' -> '0'
           3 '0' -> '0'
           4 '0' -> '0'
           5 '0' -> '0'
           6 '0' -> '0'
           7 '0' -> '0'
           8 '12137043763' -> '4294967295'
           9 '20328045' -> '20328045'
          10 '0' -> '0'
          11 '0' -> '0'
          12 '0' -> '0'
          13 '0' -> '0'
          14 '0' -> '0'
          15 '0' -> '0'
                                          
    venet0:6400296298 14753012    0    0    0     0          0         0 12142018865 20331367    0    0    0     0       0          0
    
    
    btime 1181087058
    
           0 '6400296298' -> '4294967295'
           1 '14753012' -> '14753012'
           2 '0' -> '0'
           3 '0' -> '0'
           4 '0' -> '0'
           5 '0' -> '0'
           6 '0' -> '0'
           7 '0' -> '0'
           8 '12142018865' -> '4294967295'
           9 '20331367' -> '20331367'
          10 '0' -> '0'
          11 '0' -> '0'
          12 '0' -> '0'
          13 '0' -> '0'
          14 '0' -> '0'
          15 '0' -> '0'
    3990 packets sampled in 5 seconds
    Traffic average for venet0
    
          rx           0.00 kB/s            133 packets/s
          tx           0.00 kB/s            664 packets/s
    I'm not sure why it prints out btime twice. It can't be using it to find the time differential because AFAIK btime is the server boot time...

    I'm sure with some more digging through the source I can find out why this is happening but I was wondering if anyone has run into this before, to save me some trouble. I emailed the author of the program and he did not respond.

    Thanks
    Last edited by SynVisions; 09-11-2007 at 03:46 AM.

  2. #2

    Default

    After some investigation my /proc/net/dev byte counters have exceeded the 32-bit int ceiling and it seems to be causing the problem. It seems like poor design if that is the case because this occurs at just 4095 MB, not very much.... I may be misinterpreting it, but it is definitely getting reset to the 32-bit int max.
    Last edited by SynVisions; 09-11-2007 at 06:08 AM.

  3. #3
    Join Date
    Jul 2007
    Location
    127.0.0.1
    Posts
    392

    Question

    Quote Originally Posted by SynVisions View Post
    After some investigation my /proc/net/dev byte counters have exceeded the 32-bit int ceiling and it seems to be causing the problem. It seems like poor design if that is the case because this occurs at just 4095 MB, not very much.... I may be misinterpreting it, but it is definitely getting reset to the 32-bit int max.
    Sorry to bring up an old thread, but were you able to come up with a solution? Did changing the value manually in dev resolve the issue?

    Change this:
    Code:
    venet0:36263355577 51284317
    To this:
    Code:
    venet0:0 0
    ??

    Thanks,

    Guy

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •