VNStat : A console-based network traffic monitor for Linux

vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources. However, in Linux at least a 2.2 series kernel is required.

This program is open source / GPL’ed and can be installed either as root or as a single user.

[root@host]# yum install vnstat

[root@host]# vnstat –help
vnStat 1.4 by Teemu Toivola <tst at iki dot fi>

-q, –query             query database
-h, –hours             show hours
-d, –days              show days
-m, –months            show months
-w, –weeks             show weeks
-t, –top10             show top10
-s, –short             use short output
-u, –update            update database
-i, –iface             change interface (default: eth0)
-?, –help              short help
-v, –version           show version
-tr, –traffic          calculate traffic

See also “–longhelp” for complete options list and “man vnstat”.

[root@host]# vnstat -u -i eth0
New database generated.

[root@host]# vnstat -d
eth0: Not enough data available yet.

[root@host]# vnstat -u   (Tried to start with root ,it worked)

Database updated: Wed Jul 11 23:47:56 2007


received:           6.65 MB (46.2%)
transmitted:           7.26 MB (53.8%)
total:          13.91 MB

rx     |     tx     |  total
today      6.65 MB |    7.26 MB |   13.91 MB
estimated         6 MB |       7 MB |      13 MB

[root@host]# ifconfig
eth0      Link encap:Ethernet  HWaddr
inet addr:x.x.x.x  Bcast:y.y.y.y  Mask:z.z.z.z
RX packets:134052 errors:0 dropped:0 overruns:0 frame:0
TX packets:133005 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20290369 (19.3 MiB)  TX bytes:21380626 (20.3 MiB)

lo        Link encap:Local Loopback
inet addr:  Mask:
RX packets:28253 errors:0 dropped:0 overruns:0 frame:0
TX packets:28253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3646051 (3.4 MiB)  TX bytes:3646051 (3.4 MiB)

more info


Posted on December 13, 2013, in Monitoring Tools, Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: