Plugins-Addons: vnStat - a console-based network traffic monitor
How to Check Bandwidth
descarca de aici: vnstat-1.4.5-ppc-dreambox.tar.gz - 0.02MBVNSTAT(1) User Manuals VNSTAT(1)
vnStat - a console-based network traffic monitor
vnstat [ -Ddhmqrstuvw? ] [ -i interface ] [ -tr time ] [ --cleartop ] [ --days ] [ --dbdir [dir] ] [ --debug ]
[ --disable ] [ --dumpdb ] [ --enable ] [ --help ] [ --hours ] [ --iface interface ] [ --longhelp ] [ --months
] [ --nick nickname ] [ --query ] [ --rebuildtotal ] [ --reset ] [ --short ] [ --testkernel ] [ --top10 ] [
--traffic time ] [ --update ] [ --version ] [ --weeks ]
vnStat is a console-base network traffic monitor that keeps a log of daily and monthly network traffic for the
selected interface(s). However, it isn't a packet sniffer. The traffic information is analyzed from the
proc(5) -filesystem, so that vnStat can be used without root permissions.
Show additional debug output.
Show traffic for days.
Show traffic for the last 24 hours.
-i, --iface interface
Select one specific interface and apply actions to only it.
Show traffic for months.
Force database query mode.
Reset the internal counters in the database for the selected interface. Use this if the interface goes
down and back up, otherwise that interface will get some extra traffic to its database.
Use short output mode. This mode is also used if more than one database is available.
Show all time top10 traffic days.
Calculate how much traffic goes through the selected interface during the given time seconds. The time
will be 5 seconds if a number parameter isn't included.
Update all enabled databases or only the one specified with -i parameter.
Show current version.
Show traffic for 7 days, current and previous week.
Remove all top10 entries.
If the parameter dir is specified, set the database directory to it. If dir is not specified, set the
database directory to $HOME/.vnstat. If this parameter is not specified at all, the database directory
is the global one. dir must not begin with a dash (-).
Instead of showing the database with a formated output, this output will dump the whole database in a
format that should be easy to parse with most script languages. Use this for example with php or perl to
make a custom webpage. The dump uses ; as field delimeter.
active;1 activity status
interface;eth0 name for the interface
nick;inet nick (if given)
created;1023895272 creation date in Unix time
updated;1065467100 when the database was updated
totalrx;569605 all time total received MB
totaltx;2023708 all time total transmitted MB
currx;621673719 latest rx value in /proc
curtx;981730184 latest tx value in /proc
totalrxk;644 total rx kB counter
totaltxk;494 total tx kB counter
btime;1059414541 system boot time in Unix time
Then follows 30 lines like the following
where d = days, 0 = day number in database (0 is today), 1077314401 date in Unix time, 559 = rx MB, 7433
= tx MB, 68 = rx kB, 557 = tx kB and 1 tells that vnStat has filled this value and it is in use.
m = months, t = top10 and h = hours, all other fields are in the same order as in days except hours that
doesn't have a separate kB value. For hours the forth and fifth fields have values in kB.
Enable or disable updates for selected interface. Useful for interfaces that aren't always available,
like ppp0. If the interface goes down it should be disabled in order to avoid errors. Add something like
vnstat -r --disable -i ppp0 to the script that's executed when the interface goes down and vnstat
--enable -i ppp0 to the up script.
Show a command summary.
Show complete options list.
Set the selected interfaces nickname as an alias the will be displayed in queries. Usage of -u is
required to save the change.
Reset the total traffic counters and recount those using recorded months.
Test if the kernel btime stays always to same like it should or if it's shifting.
This directory contains all databases the program uses. Files are named according to the monitored
vnstat -u -i interface forces a database update for interface or creates the database if it doesn't exist. This
is usually the first command used after a fresh install.
vnstat -u -i interface --nick nick gives interface the nickname nick and that information will be later
included with queries.
vnstat -u -r --disable -i interface resets the internal counters of interface and disables it from being
updated before enabled again with the --enable parameter. This feature is especially useful for interfaces like
ppp0 that aren't always active.
64bit counters can't currently be automatically detected, therefore support must be specified before compiling.
Estimated traffic values are likely to be somewhat inaccurate if daily traffic is low because only the MB
counter is used to calculate the estimate.
Teemu Toivola <tst at iki dot fi>
Linux MARCH 2004 VNSTAT(1)