Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Strony: 1
Jak ustawić liczenie transferu od konkretnego dnia miesiąca w vnstat?
Vnstat z uporem maniaka liczy zawsze od 1., niezależnie od ustawienia MonthRotate.
# vnStat 1.11 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 20 # 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 eth0 (remove # to activate): #MaxBWeth0 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 = dumpdb, 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 ## # 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 # file used for logging if UseLogging is set to 1 LogFile "/var/log/vnstat.log" # file used as daemon pid / lock file PidFile "/var/run/vnstat.pid" # vnstati …
Ewentualnie czy zna ktoś jakiś inny (podobny) program, który miałby to sensowniej rozwiązane.
Pod KDE idealnie działał KNemo, ale nie chce go specjalnie uruchamiać do samego mierzenia transferu.
Ostatnio edytowany przez yossarian (2013-03-16 00:29:26)
Offline
Na pewno działa na tym pliku konfiguracyjnym? Spróbuj podać mu go na talerzu:
vnstat --config plik
Offline
No właśnie na nim działa bo dla pewności zmieniałem:
# enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog) UseLogging 1
żeby logował do osobnego pliku i tę zmianę raczy respektować.
Natomiast raporty generuje z całego miesiąca
wczoraj:
i dziś (wg. vnstat.conf miał rozpocząć nowy miesiąc):
Sprawdzałem również z opcją --config, ale nadal bez rezultatu.
vnstat, vnstat -m, czy vnstat -s zawsze generuje raport z całego miesiąca.
Ostatecznie działa. Zaskoczyło po miesiącu i teraz już zmienia zgodnie ze wskazanym dniem w pliku vnstat.conf.
Ostatnio edytowany przez yossarian (2013-03-16 00:32:07)
Offline
Strony: 1