vergoh / vnstat

vnStat - a network traffic monitor for Linux and BSD
GNU General Public License v2.0
1.36k stars 120 forks source link

maxbandwidt gives me error #221

Closed AnonymousWebHacker closed 2 years ago

AnonymousWebHacker commented 2 years ago

I set the MaxBandwidt in /etc/vnstat.conf to 25000

MaxBandwidt 25000

specifying that it was 250 GB, and in the service I get that it is not a valid value

service vnstat status

ene 24 07:01:32 Latitude-E6430 systemd[1]: Stopped vnStat network traffic monitor.
ene 24 07:01:32 Latitude-E6430 systemd[1]: Started vnStat network traffic monitor.
ene 24 07:01:32 Latitude-E6430 vnstatd[347412]: Config: Invalid value for MaxBandwidth, resetting to "1000".
ene 24 07:01:32 Latitude-E6430 vnstatd[347412]: Info: vnStat daemon 2.6 started. (pid:347412 uid:133 gid:141 64-bit)
ene 24 07:01:32 Latitude-E6430 vnstatd[347412]: Info: Monitoring (5): wlp3s0 (1000 Mbit) virbr0 (1000 Mbit) tun0 (10 Mbit) outline-tun0 (10 Mbit) eno1 (1000 Mbit)
vergoh commented 2 years ago

Could you attach the output of vnstat -D? That debug output will show the content of the configuration file as the parser sees it and should give a better idea if the issue is within the configuration or somewhere else.

vergoh commented 2 years ago

Do note that you have a typo twice in your question. The configuration option is MaxBandwidth and not MaxBandwidt (you have the final h missing). That setting will also not configure any sort of quota but instead just define the maximum throughput of your connection that gets then used for sanity checks. The value of MaxBandwidth is in Mbit, not GB.

There's also a known bug with tun interfaces in version 2.6 (I see you have tun0 in the output) which has been fixed in version 2.8.

AnonymousWebHacker commented 2 years ago

Version: vnStat 2.6 , I will update to 2.8

True, it was a typo when creating the insuse (I'm not an English speaker), but if you look at the logs, I was fine. So it was my mistake, I thought it was to limit, thanks for your time and your answer

AnonymousWebHacker commented 2 years ago

¿Podrías adjuntar la salida de vnstat -D? Esa salida de depuración mostrará el contenido del archivo de configuración tal como lo ve el analizador y debería dar una mejor idea si el problema está dentro de la configuración o en otro lugar.

root@Latitude-E6430:/home/jose/Documentos# vnstat -D
Debug enabled, vnstat 2.6
Config file: /etc/vnstat.conf
  c: Interface ""
   -> "Interface" with no value, keeping default.
  c: DatabaseDir "/var/lib/vnstat"
   -> "DatabaseDir": "/var/lib/vnstat"
  c: Locale "-"
   -> "Locale": "-"
  c: DayFormat    "%Y-%m-%d"
   -> "DayFormat": "%Y-%m-%d"
  c: MonthFormat  "%Y-%m"
   -> "MonthFormat": "%Y-%m"
  c: TopFormat    "%Y-%m-%d"
   -> "TopFormat": "%Y-%m-%d"
  c: RXCharacter       "%"
   -> "RXCharacter": "%"
  c: TXCharacter       ":"
   -> "TXCharacter": ":"
  c: RXHourCharacter   "r"
   -> "RXHourCharacter": "r"
  c: TXHourCharacter   "t"
   -> "TXHourCharacter": "t"
  i: UnitMode 1
   -> "UnitMode": 1
  i: RateUnit 0
   -> "RateUnit": 0
  i: RateUnitMode 1
   -> "RateUnitMode": 1
  i: OutputStyle 3
   -> "OutputStyle": 3
  i: DefaultDecimals 2
   -> "DefaultDecimals": 2
  i: HourlyDecimals 1
   -> "HourlyDecimals": 1
  i: HourlySectionStyle 2
   -> "HourlySectionStyle": 2
  i: Sampletime 5
   -> "Sampletime": 5
  i: QueryMode 0
   -> "QueryMode": 0
  i: List5Mins      24
   -> "List5Mins": 24
  i: ListHours      24
   -> "ListHours": 24
  i: ListDays       30
   -> "ListDays": 30
  i: ListMonths     12
   -> "ListMonths": 12
  i: ListYears       0
   -> "ListYears": 0
  i: ListTop        10
   -> "ListTop": 10
  c: DaemonUser ""
   -> "DaemonUser" with no value, keeping default.
  c: DaemonGroup ""
   -> "DaemonGroup" with no value, keeping default.
  i: BandwidthDetection 1
   -> "BandwidthDetection": 1
  i: MaxBandwidth 1000
   -> "MaxBandwidth": 1000
  i: 5MinuteHours   48
   -> "5MinuteHours": 48
  i: HourlyDays      4
   -> "HourlyDays": 4
  i: DailyDays      62
   -> "DailyDays": 62
  i: MonthlyMonths  25
   -> "MonthlyMonths": 25
  i: YearlyYears    -1
   -> "YearlyYears": -1
  i: TopDayEntries  20
   -> "TopDayEntries": 20
  i: UpdateInterval 20
   -> "UpdateInterval": 20
  i: PollInterval 5
   -> "PollInterval": 5
  i: SaveInterval 5
   -> "SaveInterval": 5
  i: OfflineSaveInterval 30
   -> "OfflineSaveInterval": 30
  i: MonthRotate 1
   -> "MonthRotate": 1
  i: MonthRotateAffectsYears 0
   -> "MonthRotateAffectsYears": 0
  i: CheckDiskSpace 1
   -> "CheckDiskSpace": 1
  i: BootVariation 15
   -> "BootVariation": 15
  i: TrafficlessEntries 1
   -> "TrafficlessEntries": 1
  i: TimeSyncWait 5
   -> "TimeSyncWait": 5
  i: BandwidthDetectionInterval 5
   -> "BandwidthDetectionInterval": 5
  i: SaveOnStatusChange 1
   -> "SaveOnStatusChange": 1
  i: UseLogging 2
   -> "UseLogging": 2
  i: CreateDirs 1
   -> "CreateDirs": 1
  i: UpdateFileOwner 1
   -> "UpdateFileOwner": 1
  c: LogFile "/var/log/vnstat/vnstat.log"
   -> "LogFile": "/var/log/vnstat/vnstat.log"
  c: PidFile "/run/vnstat/vnstat.pid"
   -> "PidFile": "/run/vnstat/vnstat.pid"
  i: 64bitInterfaceCounters -2
   -> "64bitInterfaceCounters": -2
  i: DatabaseWriteAheadLogging 0
   -> "DatabaseWriteAheadLogging": 0
  i: DatabaseSynchronous -1
   -> "DatabaseSynchronous": -1
  c: HeaderFormat "%Y-%m-%d %H:%M"
   -> "HeaderFormat": "%Y-%m-%d %H:%M"
  i: HourlyRate 1
   -> "HourlyRate": 1
  i: SummaryRate 1
   -> "SummaryRate": 1
  i: TransparentBg 0
   -> "TransparentBg": 0
  c: CBackground     "FFFFFF"
   -> "CBackground": "FFFFFF"
  c: CEdge           "AEAEAE"
   -> "CEdge": "AEAEAE"
  c: CHeader         "606060"
   -> "CHeader": "606060"
  c: CHeaderTitle    "FFFFFF"
   -> "CHeaderTitle": "FFFFFF"
  c: CHeaderDate     "FFFFFF"
   -> "CHeaderDate": "FFFFFF"
  c: CText           "000000"
   -> "CText": "000000"
  c: CLine           "B0B0B0"
   -> "CLine": "B0B0B0"
  c: CLineL          "-"
   -> "CLineL": "-"
  c: CRx             "92CF00"
   -> "CRx": "92CF00"
  c: CTx             "606060"
   -> "CTx": "606060"
  c: CRxD            "-"
   -> "CRxD": "-"
  c: CTxD            "-"
   -> "CTxD": "-"
Config file: /etc/vnstat.conf
ibw list is empty.
arg 1: "-D"
Dir OK
Database "/var/lib/vnstat/vnstat.db" open (ro: 1)
Database version "1", current version "1"
5 interface(s) found
Automatically selected interface from db: "wlp3s0"

                      rx      /      tx      /     total    /   estimated

Processing interface "eno1"...
 eno1: Not enough data available yet.

Processing interface "outline-tun0"...
 outline-tun0:
       2022-01       4.75 MB  /     1.66 MB  /     6.41 MB  /     5.11 MB
         today       4.75 MB  /     1.66 MB  /     6.41 MB  /     7.26 MB

showsummary() in 0.000476 s

Processing interface "tun0"...
 tun0:
       2022-01     376.07 MB  /    59.63 MB  /   435.70 MB  /   564.51 MB
         today     376.07 MB  /    59.63 MB  /   435.70 MB  /   494.02 MB

showsummary() in 0.000318 s

Processing interface "virbr0"...
 virbr0: Not enough data available yet.

Processing interface "wlp3s0"...
 wlp3s0:
       2022-01     881.10 MB  /   139.97 MB  /     1.00 GB  /     1.29 GB
         today     881.10 MB  /   139.97 MB  /     1.00 GB  /     1.13 GB

showsummary() in 0.000340 s
Database closed