Problema con vnstat e PF 2.5.1
-
Ho installato l'ultima versione di PF Sense, la 2.5.1 e il pacchetto Status_Traffic_Totals ma non
parte il servizio vnstatd. Ho letto che ci sono stati problemi sulla versione (vado a memoria) 2.4.4 e che era uscita una patch poi rimossa, qualcuno conosce il link o sa darmi qualche soluzione?Questo il log
Command output: traffico (/usr/local/bin/vnstat -i re1; /usr/local/bin/vnstat -i re1 -h)Error: Unable to open database directory "/var/lib/vnstat": No such file or directory
The vnStat daemon should have created this directory when started.
Check that it is configured and running. See also "man vnstatd".
Error: Unable to open database directory "/var/lib/vnstat": No such file or directory
The vnStat daemon should have created this directory when started.
Check that it is configured and running. See also "man vnstatd".Grazie in anticipo a tutti.
-
io ho ancora la 2.5.0 e qui funziona comunque il percorso giusto del database è /var/db/vnstat
e non /var/lib/vnstat non credo sia cambiata dalla 2.5.0 alla 2.5.1
verificane la presenza da terminale.la riga di comando del processo è
/usr/local/sbin/vnstatd -d -p /var/run/vnstat/vnstat.pid --config /usr/local/etc/vnstat.confproverei a rimuovere e a reinstallare il pacchetto
o a verificare il contenuto di /usr/local/etc/vnstat.conf -
@kiokoman said in Problema con vnstat e PF 2.5.1:
/usr/local/sbin/vnstatd -d -p /var/run/vnstat/vnstat.pid --config /usr/local/etc/vnstat.conf
Niente ho provato tutto quello che mi hai detto te, ma il servizio non parte....non è essenziale ma è comodo.
-
@hd_cairocomm
hai controllato il contenuto di /usr/local/etc/vnstat.conf ?cat /usr/local/etc/vnstat.conf
-
@kiokoman said in Problema con vnstat e PF 2.5.1:
cat /usr/local/etc/vnstat.conf
Questo il contenuto del file, linux non è proprio il mio campo :)
[2.5.1-RELEASE][admin@pf-star.star-service.it]/root: cat /usr/local/etc/vnstat.conf
vnStat 2.6 config file
default interface (leave empty for automatic selection)
Interface ""
location of the database directory
DatabaseDir "/var/lib/vnstat"
locale (LC_ALL) ("-" = use system locale)
Locale "-"
date output formats for -d, -m, -t and -w
DayFormat "%Y-%m-%d"
MonthFormat "%Y-%m"
TopFormat "%Y-%m-%d"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...)
1 = old style binary prefixes (KB/MB/GB...)
2 = SI decimal prefixes (kB/MB/GB...)
UnitMode 0
used rate unit (0 = bytes, 1 = bits)
RateUnit 1
how units are prefixed when traffic rate is shown in bits
0 = IEC binary prefixes (Kibit/s...)
1 = SI decimal prefixes (kbit/s...)
RateUnitMode 1
output style
0 = minimal & narrow, 1 = bar column visible
2 = same as 1 except rate in summary
3 = rate column visible
OutputStyle 3
number of decimals to use in outputs
DefaultDecimals 2
HourlyDecimals 1spacer for separating hourly sections (0 = none, 1 = '|', 2 = '][', 3 = '[ ]')
HourlySectionStyle 2
how many seconds should sampling for -tr take by default
Sampletime 5
default query mode
0 = normal, 1 = days, 2 = months, 3 = top, 5 = short
7 = hours, 8 = xml, 9 = one line, 10 = json
QueryMode 0
default list output entry limits (0 = all)
List5Mins 24
ListHours 24
ListDays 30
ListMonths 12
ListYears 0
ListTop 10vnstatd
switch to given user when started as root (leave empty to disable)
DaemonUser ""
switch to given group when started as root (leave empty to disable)
DaemonGroup ""
try to detect interface maximum bandwidth, 0 = disable feature
MaxBandwidth will be used as fallback value when enabled
BandwidthDetection 1
maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
(unless interface specific limit is given)
MaxBandwidth 1000
interface specific limits
example 8Mbit limit for 'ethnone':
MaxBWethnone 8
data retention durations (-1 = unlimited, 0 = feature disabled)
5MinuteHours 48
HourlyDays 4
DailyDays 62
MonthlyMonths 25
YearlyYears -1
TopDayEntries 20how often (in seconds) interface data is updated
UpdateInterval 20
how often (in seconds) interface status changes are checked
PollInterval 5
how often (in minutes) data is saved to database
SaveInterval 5
how often (in minutes) data is saved when all interface are offline
OfflineSaveInterval 30
on which day should months change
MonthRotate 1
MonthRotateAffectsYears 0filesystem disk space check (1 = enabled, 0 = disabled)
CheckDiskSpace 1
how much the boot time can variate between updates (seconds)
BootVariation 15
create database entries even when there is no traffic (1 = enabled, 0 = disabled)
TrafficlessEntries 1
how many minutes to wait during daemon startup for system clock to
sync time if most recent database update appears to be in the future
TimeSyncWait 5
how often (in minutes) bandwidth detection is done when
BandwidthDetection is enabled (0 = disabled)
BandwidthDetectionInterval 5
force data save when interface status changes (1 = enabled, 0 = disabled)
SaveOnStatusChange 1
enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
UseLogging 2
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 "/var/run/vnstat/vnstat.pid"
1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection
64bitInterfaceCounters -2
use SQLite Write-Ahead Logging mode (1 = enabled, 0 = disabled)
DatabaseWriteAheadLogging 0
change the setting of the SQLite "synchronous" flag
(-1 = auto, 0 = off, 1, = normal, 2 = full, 3 = extra)
DatabaseSynchronous -1
vnstati
title timestamp format
HeaderFormat "%Y-%m-%d %H:%M"
show hours with rate (1 = enabled, 0 = disabled)
HourlyRate 1
show rate in summary (1 = enabled, 0 = disabled)
SummaryRate 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 "-" -
@hd_cairocomm
sul mio 2.5.0 c'e' ancora vnstat 2.2 tu hai vnstat 2.6
adesso carico una machina virtuale e verifico se è un bug o un problema tuo -
funziona perfettamente a me nella 2.5.1 dopo una installazione pulita, forse è rimasto qualche rimasuglio dopo un aggiornamento
che cosa ti dice quando lanci da terminale
killall vnstatd /usr/local/sbin/vnstatd -d -p /var/run/vnstat/vnstat.pid --config /usr/local/etc/vnstat.conf
?
-
Rimosso (per l'ennesima volta) reinstallato e ora funziona, la mia è comunque un'installazione pulita....bhò
Cmq Grazie a tutti per il supporto!
M.