vnStat nie zlicza transferu

Tematy związane z oprogramowaniem, instalacją, konfiguracją
Paweł
Posty: 32
Rejestracja: 08 września 2015, 19:28

Post autor: Paweł »

Zrestartowałem serwis

Kod: Zaznacz cały


/etc/init.d/vnstat restart


Plik konfiguracyjny wygląda teraz tak

Kod: Zaznacz cały


# vnStat 1.12 config file
##


# default interface
Interface "wlan0"


# location of the database directory
DatabaseDir "/var/lib/vnstat"


# locale (LC_ALL) ("-" = use system locale)
Locale "-"


# on which day should months change
MonthRotate 1


# date output formats for -d, -m, -t and -w
# see 'man date' for control codes
DayFormat    "%x"
MonthFormat  "%b '%y"
TopFormat    "%x"


# characters used for visuals
RXCharacter       "%"
TXCharacter       ":"
RXHourCharacter   "r"
TXHourCharacter   "t"


# how units are prefixed when traffic is shown
# 0 = IEC standard prefixes (KiB/MiB/GiB/TiB)
# 1 = old style binary prefixes (KB/MB/GB/TB)
UnitMode 0


# output style
# 0 = minimal & narrow, 1 = bar column visible
# 2 = same as 1 except rate in summary and weekly
# 3 = rate column visible
OutputStyle 3


# used rate unit (0 = bytes, 1 = bits)
RateUnit 1


# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
# (unless interface specific limit is given)
MaxBandwidth 100


# interface specific limits
#  example 8Mbit limit for 'ethnone':
MaxBWethnone 8


# how many seconds should sampling for -tr take by default
Sampletime 5


# default query mode
# 0 = normal, 1 = days, 2 = months, 3 = top10
# 4 = exportdb, 5 = short, 6 = weeks, 7 = hours
QueryMode 0


# filesystem disk space check (1 = enabled, 0 = disabled)
CheckDiskSpace 1


# database file locking (1 = enabled, 0 = disabled)
UseFileLocking 1


# how much the boot time can variate between updates (seconds)
BootVariation 15


# log days without traffic to daily list (1 = enabled, 0 = disabled)
TrafficlessDays 1




# vnstatd
##


# switch to given user when started as root (leave empty to disable)
DaemonUser ""


# switch to given user when started as root (leave empty to disable)
DaemonGroup ""


# how often (in seconds) interface data is updated
UpdateInterval 30


# how often (in seconds) interface status changes are checked
PollInterval 5


# how often (in minutes) data is saved to file
SaveInterval 5


# how often (in minutes) data is saved when all interface are offline
OfflineSaveInterval 30


# force data save when interface status changes (1 = enabled, 0 = disabled)
SaveOnStatusChange 1


# enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
UseLogging 1


# create dirs if needed (1 = enabled, 0 = disabled)
CreateDirs 1


# update ownership of files if needed (1 = enabled, 0 = disabled)
UpdateFileOwner 1


# file used for logging if UseLogging is set to 1
LogFile "/var/log/vnstat/vnstat.log"


# file used as daemon pid / lock file
PidFile "/run/vnstat/vnstat.pid"




# vnstati
##


# title timestamp format
HeaderFormat "%x %H:%M"


# show hours with rate (1 = enabled, 0 = disabled)
HourlyRate 1


# show rate in summary (1 = enabled, 0 = disabled)
SummaryRate 1


# layout of summary (1 = with monthly, 0 = without monthly)
SummaryLayout 1


# transparent background (1 = enabled, 0 = disabled)
TransparentBg 0


# image colors
CBackground     "FFFFFF"
CEdge           "AEAEAE"
CHeader         "606060"
CHeaderTitle    "FFFFFF"
CHeaderDate     "FFFFFF"
CText           "000000"
CLine           "B0B0B0"
CLineL          "-"
CRx             "92CF00"
CTx             "606060"
CRxD            "-"
CTxD            "-"



Awatar użytkownika
dedito
Moderator
Posty: 3560
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Post autor: dedito »

I dalej nic na statystykach dziennych nie pokazuje?
Paweł
Posty: 32
Rejestracja: 08 września 2015, 19:28

Post autor: Paweł »

Wygląda to tak,

Kod: Zaznacz cały



root@debian:/home/piotr# vnstat
Database updated: Sun Jan 24 12:06:22 2016


   wlan0 since 20.01.2016


          rx:  975 KiB      tx:  197 KiB      total:  1,14 MiB


   monthly
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
       sty '16       975 KiB |     197 KiB |    1,14 MiB |    0,00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |


   daily
                     rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     20.01.2016      975 KiB |     197 KiB |    1,14 MiB |    0,22 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |
root@debian:/home/piotr# 



Jedynie co działa w tym programie to generowanie statystyk w czasie rzeczywistym

Kod: Zaznacz cały


root@debian:/home/piotr# vnstat -l
Monitoring wlan0...    (press CTRL-C to stop)


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




 wlan0  /  traffic statistics


                           rx         |       tx
--------------------------------------+------------------
  bytes                    39,84 MiB  |        1,60 MiB
--------------------------------------+------------------
          max            4,63 Mbit/s  |      169 kbit/s
      average            1,17 Mbit/s  |    47,04 kbit/s
          min               0 kbit/s  |        0 kbit/s
--------------------------------------+------------------
  packets                      30576  |           14818
--------------------------------------+------------------
          max                405 p/s  |         202 p/s
      average                109 p/s  |          53 p/s
          min                  0 p/s  |           0 p/s
--------------------------------------+------------------
  time                  4,63 minutes


root@debian:/home/piotr# 



Paweł
Posty: 32
Rejestracja: 08 września 2015, 19:28

Post autor: Paweł »

Po kolejnym usunięciu i zainstalowaniu tego pakietu, zaczęło działać i podliczać mi transfer :) . Sam nie wiem co było przyczyną problemu , w każdym razie dzięki za pomoc.
Awatar użytkownika
dedito
Moderator
Posty: 3560
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Post autor: dedito »

W takim razie oznacz odpowiednio temat.
ODPOWIEDZ