"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "man/vnstatd.8" between
vnstat-2.7.tar.gz and vnstat-2.8.tar.gz

About: vnStat is a console-based network traffic monitor (using the /proc filesystem).

vnstatd.8  (vnstat-2.7):vnstatd.8  (vnstat-2.8)
VNSTATD(8) User Manuals VNSTATD(8) VNSTATD(8) User Manuals VNSTATD(8)
NAME NAME
vnstatd - daemon based database updating for vnStat vnstatd - daemon based database updating for vnStat
SYNOPSIS SYNOPSIS
vnstatd [-Ddnpsv?] [--alwaysadd] [--config file] [--daemon] [--deb ug] [-g group] [--group group] vnstatd [-Ddnpsv?] [--alwaysadd [mode]] [--config file] [--daemon] [--d ebug] [-g group] [--group group]
[--help] [--initdb] [--noadd] [--nodaemon] [--pidfile file] [--sync] [--u user] [--user user] [--version] [--help] [--initdb] [--noadd] [--nodaemon] [--pidfile file] [--sync] [--u user] [--user user] [--version]
DESCRIPTION DESCRIPTION
The purpose of vnstatd is to provide a flexible and robust way for updati ng the database that vnstat(1) The purpose of vnstatd is to provide a flexible and robust way for updati ng the database that vnstat(1)
uses. The availability of each interface is automatically tracked which removes the need for additional uses. The availability of each interface is automatically tracked which removes the need for additional
scripts to be implemented and called when an interface comes online or go es offline. scripts to be implemented and called when an interface comes online or go es offline.
vnstatd is the command for starting the daemon. The daemon can either for k itself to run as a background vnstatd is the command for starting the daemon. The daemon can either for k itself to run as a background
process or stay attached to the terminal. It supports logging to a user selectable file or using syslog. process or stay attached to the terminal. It supports logging to a user selectable file or using syslog.
Once started, the daemon will read vnstat.conf(5) if available and t hen check if there is a database Once started, the daemon will read vnstat.conf(5) if available and t hen check if there is a database
present in the database directory that has been specified in the configur ation file. By default, if no present in the database directory that has been specified in the configur ation file. By default, if no
database is found, a database will be created during startup with entr ies for all available interfaces database is found, a database will be created during startup with entr ies for all available interfaces
excluding pseudo interfaces lo, lo0 and sit0. This automatic database ent ry creation behaviour can be excluding pseudo interfaces lo, lo0 and sit0. This automatic database ent ry creation behaviour can be
disabled using the --noadd option. Alternatively, it is possible to allo disabled using the --noadd option. Alternatively, using the --alwaysad
w the daemon to create new data- d option instructs the daemon to
base entries whenever previously unseen interfaces become visible using t create new database entries whenever interfaces not currently in the data
he --alwaysadd option. bases become visible.
The daemon will proceed to track the availability of monitored interfaces , process the interface traffic The daemon will proceed to track the availability of monitored interfaces , process the interface traffic
statistics and write new values to the database at a configured interval. As a result, the daemon ends up statistics and write new values to the database at a configured interval. As a result, the daemon ends up
spending most of the time sleeping between updates. spending most of the time sleeping between updates.
Data is stored in the database using local time based on the daemon's exe When the UseUTC configuration option isn't enabled, data is stored in the
cution environment. Any changes database using local time based
in the system clock or the system timezone configuration will result in on the daemon's execution environment when the configuration option i
data being inserted according to sn't enabled. Any changes in the
the new local time without any recalculation being done for already store system clock or the system timezone configuration will result in data bei
d data. The daemon and the data- ng inserted according to the new
base in essence aren't aware of the used timezone or possible daylight s local time without any recalculation being done for already stored data
aving time and cannot be config- . The daemon and the database in
ured to offset the timestamps to any direction. If a system clock or syst essence aren't aware of the used timezone or possible daylight saving tim
em timezone change or daylight e and cannot be configured to
saving time observation ending results in an already seen time period t offset the timestamps to any direction. If a system clock or system ti
o repeat then the existing data- mezone change or daylight saving
base values get incremented with the new data. time observation ending results in an already seen time period to repeat
then the existing database val-
ues get incremented with the new data.
OPTIONS OPTIONS
--alwaysadd --alwaysadd [mode]
Enable automatic creation of new database entries for previously u Enable automatic creation of new database entries for interfac
nseen interfaces even if the es not currently in the database
database already exists when the daemon is started. New database e even if the database file already exists when the daemon is starte
ntries will also get created for d. New database entries will
new interfaces seen while the daemon is running. Pseudo interfaces also get created for new interfaces seen while the daemon is ru
lo, lo0 and sit0 are always nning. Pseudo interfaces lo, lo0
excluded from getting added. and sit0 are always excluded from getting added. Using the option
without mode defined or with
mode set to 1 will enable the feature. Setting mode to 0 will d
isable the feature. This command
line option overrides the AlwaysAddNewInterfaces configuration opt
ion when used.
--config file --config file
Use file as configuration file instead of using automatic configur ation file search functionality. Use file as configuration file instead of using automatic configur ation file search functionality.
-d, --daemon -d, --daemon
Fork process to background and run as a daemon. Fork process to background and run as a daemon.
-D, --debug -D, --debug
Provide additional output for debug purposes. The process will s tay attached to the terminal for Provide additional output for debug purposes. The process will sta y attached to the terminal for
output. output.
-g, --group group -g, --group group
Set daemon process group to group during startup. group can be ei ther the name of the group or a Set daemon process group to group during startup. group can be e ither the name of the group or a
numerical group id. This option can only be used when the process is started as root. numerical group id. This option can only be used when the process is started as root.
--initdb --initdb
Create a new empty database without interface data and exit. If Create a new empty database without interface data and exit. If th
the database already exists then e database already exists then
access to it is only verified. The daemon will not stay running wh access to it is only verified. The daemon will not stay runnin
en this option is used. This g when this option is used. This
option cannot be used in combination with -d, --daemon or -n, --no daemon. option cannot be used in combination with -d, --daemon or -n, --no daemon.
--noadd --noadd
Disable the automatic creation of new database entries for all av Disable the automatic creation of new database entries for all ava
ailable interfaces if the daemon ilable interfaces if the daemon
is started with no database found or with a database without any i is started with no database found or with a database without any
nterfaces. The daemon will fail interfaces. The daemon will fail
to start if this option is used when the database contains no to start if this option is used when the database contains no inte
interfaces or doesn't exist. The rfaces or doesn't exist. The
daemon will create an empty database if one doesn't already exist. daemon will create an empty database if one doesn't already exis
Pseudo interfaces lo, lo0 and t. Pseudo interfaces lo, lo0 and
sit0 are always excluded from getting added regardless of this opt ion. sit0 are always excluded from getting added regardless of this opt ion.
-n, --nodaemon -n, --nodaemon
Stay in foreground attached to the current terminal and start the update process. Stay in foreground attached to the current terminal and start the update process.
-p, --pidfile file -p, --pidfile file
Write the process id to file and use it for locking so that anoth Write the process id to file and use it for locking so that anothe
er instance of the daemon cannot r instance of the daemon cannot
be started if the same file is specified. This option has no effec be started if the same file is specified. This option has no ef
t if used in combination with fect if used in combination with
-n, --nodaemon. -n, --nodaemon.
-s, --sync -s, --sync
Synchronize internal counters in the database with interface count ers for all available interfaces Synchronize internal counters in the database with interface count ers for all available interfaces
before starting traffic monitoring. Use this option if the traffi before starting traffic monitoring. Use this option if the traff
c between the previous shutdown ic between the previous shutdown
and the current startup of the daemon needs to be ignored. This and the current startup of the daemon needs to be ignored. This op
option isn't required in normal tion isn't required in normal
use because the daemon will automatically synchronize the internal counters after a system reboot, use because the daemon will automatically synchronize the internal counters after a system reboot,
if enough time has passed since the daemon was previously running or if the internal counters are if enough time has passed since the daemon was previously running or if the internal counters are
clearly out of sync. clearly out of sync.
-u, --user user -u, --user user
Set daemon process user to user during startup. user can be eithe r the login of the user or a Set daemon process user to user during startup. user can be e ither the login of the user or a
numerical user id. This option can only be used when the process i s started as root. numerical user id. This option can only be used when the process i s started as root.
-v, --version -v, --version
Show current version of the daemon executable. Show current version of the daemon executable.
-?, --help -?, --help
Show a command option summary. Show a command option summary.
CONFIGURATION CONFIGURATION
The behaviour of the daemon is configured mainly using the config uration keywords UpdateInterval, The behaviour of the daemon is configured mainly using the configur ation keywords UpdateInterval,
PollInterval and SaveInterval in the configuration file. PollInterval and SaveInterval in the configuration file.
UpdateInterval defines in seconds how often the interface data is fetched UpdateInterval defines in seconds how often the interface data is fetch
and updated. This is similar ed and updated. This is similar
to the run interval for alternative cron based updating. However, to the run interval for alternative cron based updating. However, the
the difference is that the data difference is that the data
doesn't directly get written to disk during updates. doesn't directly get written to disk during updates.
PollInterval defines in seconds how often the list of available interf PollInterval defines in seconds how often the list of available in
aces is checked for possible terfaces is checked for possible
changes. The minimum value is 2 seconds and the maximum 60 seconds. Pol changes. The minimum value is 2 seconds and the maximum 60 seconds. Poll
lInterval also defines the reso- Interval also defines the reso-
lution for other intervals. lution for other intervals.
SaveInterval defines in minutes how often cached interface data is writte SaveInterval defines in minutes how often cached interface data is wr
n to disk. A write can only itten to disk. A write can only
occur during the updating of interface data. Therefore, the value should occur during the updating of interface data. Therefore, the value should
be a multiple of UpdateInterval be a multiple of UpdateInterval
with a maximum value of 60 minutes. with a maximum value of 60 minutes.
The default values of UpdateInterval 30, SaveInterval 5 and PollInterval The default values of UpdateInterval 30, SaveInterval 5 and PollInterval
5 are usually suitable for most 5 are usually suitable for most
systems and provide a similar behaviour as cron based updating does systems and provide a similar behaviour as cron based updating does but
but with a better resolution for with a better resolution for
interface changes and fast interfaces. interface changes and fast interfaces.
For embedded and/or low power systems more tuned configurations are poss ible. In such cases if the For embedded and/or low power systems more tuned configurations are possible. In such cases if the
interfaces are mostly static the PollInterval can be increased to around 10-30 seconds and UpdateInterval interfaces are mostly static the PollInterval can be increased to around 10-30 seconds and UpdateInterval
set to 60 seconds. Higher values up to 300 seconds are possible if the in set to 60 seconds. Higher values up to 300 seconds are possible if t
terface speed is 10 Mbit or he interface speed is 10 Mbit or
less. SaveInterval can be increased for example to 15, 30 or even 60 mi less. SaveInterval can be increased for example to 15, 30 or even 60 min
nutes depending on how often the utes depending on how often the
data needs to be viewed. data needs to be viewed.
SIGNALS SIGNALS
The daemon is listening to signals SIGHUP, SIGINT and SIGTERM. Sending t he SIGHUP signal to the daemon The daemon is listening to signals SIGHUP, SIGINT and SIGTERM. Sending the SIGHUP signal to the daemon
will cause cached data to be written to disk, a rescan of the database di rectory and a reload of settings will cause cached data to be written to disk, a rescan of the database di rectory and a reload of settings
from the configuration file. However, the pid file location will not be c hanged even if it's configura- from the configuration file. However, the pid file location will not be changed even if it's configura-
tion setting has been modified. tion setting has been modified.
SIGTERM and SIGINT signals will cause the daemon to write all cached data to disk and then exit. SIGTERM and SIGINT signals will cause the daemon to write all cached data to disk and then exit.
FILES FILES
/var/lib/vnstat/ /var/lib/vnstat/
Default database directory. Default database directory.
/etc/vnstat.conf /etc/vnstat.conf
Config file that will be used unless $HOME/.vnstatrc exists. S ee the configuration chapter and Config file that will be used unless $HOME/.vnstatrc exists. See the configuration chapter and
vnstat.conf(5) for more information. vnstat.conf(5) for more information.
/var/log/vnstat/vnstat.log /var/log/vnstat/vnstat.log
Log file that will be used if logging to file is enable and no oth er file is specified in the con- Log file that will be used if logging to file is enable and no oth er file is specified in the con-
fig file. fig file.
/var/run/vnstat/vnstat.pid /var/run/vnstat/vnstat.pid
File used for storing the process id when running as a background process and if no other file is File used for storing the process id when running as a background process and if no other file is
specified in the configuration file or using the command line para meter. specified in the configuration file or using the command line para meter.
RESTRICTIONS RESTRICTIONS
Updates need to be executed at least as often as it is possible for the Updates need to be executed at least as often as it is possible for
interface to generate enough the interface to generate enough
traffic to overflow the kernel interface traffic counter. Otherwise, traffic to overflow the kernel interface traffic counter. Otherwise, it i
it is possible that some traffic s possible that some traffic
won't be seen. With 32-bit interface traffic counters, the maximum time b won't be seen. With 32-bit interface traffic counters, the maximum tim
etween two updates depends on e between two updates depends on
how fast the interface can transfer 4 GiB. Note that there is no gu how fast the interface can transfer 4 GiB. Note that there is no guarant
arantee that a 64-bit kernel has ee that a 64-bit kernel has
64-bit interface traffic counters for all interfaces. Calculated theoreti cal times are: 64-bit interface traffic counters for all interfaces. Calculated theoreti cal times are:
10 Mbit: 54 minutes 10 Mbit: 54 minutes
100 Mbit: 5 minutes 100 Mbit: 5 minutes
1000 Mbit: 30 seconds 1000 Mbit: 30 seconds
Virtual and aliased interfaces cannot be monitored because the kernel doe sn't provide traffic information Virtual and aliased interfaces cannot be monitored because the kernel doe sn't provide traffic information
for that type of interfaces. Such interfaces are usually named eth0:0, e th0:1, eth0:2 etc. where eth0 is for that type of interfaces. Such interfaces are usually named eth0:0, et h0:1, eth0:2 etc. where eth0 is
the actual interface being aliased. the actual interface being aliased.
AUTHOR AUTHOR
Teemu Toivola <tst at iki dot fi> Teemu Toivola <tst at iki dot fi>
SEE ALSO SEE ALSO
vnstat(1), vnstati(1), vnstat.conf(5), signal(7) vnstat(1), vnstati(1), vnstat.conf(5), signal(7)
version 2.7 MAY 2021 VNSTATD(8) version 2.8 SEPTEMBER 2021 VNSTATD(8)
 End of changes. 26 change blocks. 
85 lines changed or deleted 92 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)