Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ vnStatSVG: traffic monitoring software vnStat     - Oracle large table to clean truncate .. reuse storage (Database)

- Java Performance Tuning the proxy mode (Programming)

- Linux compression and decompression command (Linux)

- How to use Git to upload code to GitHub project (Linux)

- To compile install and test Swift under Linux (Linux)

- 5 fast Node.js application performance tips (Programming)

- Camouflage Nginx Web server version to prevent invasion (Linux)

- shell script: MySQL startup script simple (Database)

- Redis configuration file interpretation (Database)

- To restore the last time applications running when Ubuntu user log in again (Linux)

- Linux can modify the maximum number of open files (Linux)

- CentOS7 build GlusterFS (Linux)

- Linux remote landing system (Linux)

- The YUM package management under Linux (Linux)

- MySQL Slave synchronization problem solving (Database)

- ASM Management - How to Rename diskgroup (Database)

- You can not ignore the seven Git tips (Linux)

- Mac OS X 10.10 Yosemite compiling OpenJDK 9 (Linux)

- Linux --- process tracking (Linux)

- VMware Workstation virtual machine cloning (Linux)

  vnStatSVG: traffic monitoring software vnStat
  Add Date : 2018-11-21      
  VnStat Profile

vnStat is a lightweight network traffic monitoring tool, the current major Linux / BSD systems have built-in support.

vnStat itself only supports interactive command line and Web front end by a third-party tool support. Here a summary and comparison under vnStat several Web front-end and recommend the best one.


vnStat Web front-end comparison

Four front-end vnStat home recommended are:

vnStat SVG frontend: based on CGI / SVG / AJAX lightweight web front end

Just need a HTTP server supports CGI, can produce very nice SVG-based graphical reporting. Monthly support / day / hour / s view traffic information, etc., also supports top10 show.

Because no need to install additional PHP parser, so easy to support Apache, Nginx and built Busybox httpd server.

More importantly, vnStatSVG not only supports common Linux host, you can also easily support servers, clusters or is a small embedded systems.

jsvnstat - interactive network traffic analysis

jsvnstat is additionally a Web front-end, based on Javascript can achieve a simple interaction, but it relies on PHP support, and does not support clustering and embedded systems.

vnStat PHP frontend: a PHP-based Web front end

Heavily dependent on PHP and GD image libraries. Also does not support clustering and embedded systems.

VnstatSystrayIcon (Windows): Windows-based platform


vnStatSVG best performance

The above comparison is not difficult to find a best vnStat vnStatSVG tip.

It's about more features, from its official home page can be found at:

Graphics-based CGI / SVG / AJAX to dynamically generate traffic reports (Top10 / monthly / daily / hourly / second / Summary)
Supports Apache, Nginx and Busybox httpd, even other more lightweight Web server
Only CGI support, without PHP and other additional modules, it takes up very little space
Because the only traffic data transmitted in XML format from the server, the bandwidth consumption is very small
You can monitor a single host any number of network device interface, such as eth0, eth1 ...
In one window while monitoring a cluster of any number of hosts
Information on the left side of the device node to expand, but also shrink, even while monitoring dozens of hosts are easy viewing
It supports a variety of communication protocols between clusters: http, ftp, file and even ssh
Supports multiple browser clients: Chromium, Firefox and Safari
Flexibility to get traffic data in XML format through a variety of different ways
In short, vnStatSVG not only supports common Linux hosts, servers, clusters, and support based on Busybox such small embedded systems.


vnStatSVG Quick Start

Home vnStatSVG details of their use, but it is available in English, we use the Chinese briefly explain how to quickly install and use it on Ubuntu host.


And Apache installation vnStat

sudo apt-get install vnstat apache2

Download vnStatSVG

git clonehttps: //gitlab.com/tinylab/vnstatsvg.git

Installation vnStatSVG

Suppose the root directory of the Apache in / var / www /, you can create a vnstatsvg directory / var / www /, and then install the Web front-end to the next.

sudo-scd vnstatsvg.gitmkdir / var / www / vnstatsvg. / configure-dvnstatsvgmake && make install
If the root directory is not / var / www /, specify the use ./configure w.


View traffic information via the Web

It can open the default browser to http: // localhost / vnstatsvg / view the information flow.


Adding more network equipment nodes

You can edit the information of each /var/www/vnstatsvg/sidebar.xml modify device nodes, you can directly copy a template in the past:

sudo cp src / admin / sidebar.xml-template-4-singlehost / var / www / vnstatsvg / sidebar.xml
Configuration roughly as follows:

< ? Xml version = '1.0'encoding =' UTF-8'standalone = 'no'?> < Sidebarid = "sidebar">
< -! Thisconfiguration isforsingle host, the hosts anddump_tool field should be the same ->
< Iface>
< Name> eth0 < / name>
< Host> localhost < / host>
< Description> Local Host < / description>
< / Iface>
< / Sidebar>
More templates please see src / admin / sidebar.xml-template *.

After editing sidebar.xml configure various types of network device node information:

name: network equipment node name, the default is eth0, eth1 ...
host: host address or domain name
protocol: traffic data acquisition protocol in XML format, the default is http
dump_tool: default shell mode, ie /cgi-bin/vnstat.sh
description: device node corresponding service description

It supports simultaneous monitoring of multiple hosts

If you want to monitor multiple hosts, the easiest way to install than a vnstat and vnStatSVG the same way on other machines, so you only need to configure name, host and description, the other to keep the default.

For example, if you want to monitor localhost and Thai dawn Technology (domain name tinylab.org) data, you can add a configuration as follows:

< ? Xml version = '1.0'encoding =' UTF-8'standalone = 'no'?>
< Sidebarid = "sidebar">
< -! Thisconfiguration isforsingle host, the hosts anddump_tool field should be the same ->
< Iface>
< Name> eth0 < / name>
< Host> localhost < / host>
< Description> Local Host < / description>
< Name> eth1 < / name>
< Host> tinylab.org < / host>
< Description> TinyLab.org < / description>
< / Iface>
< / Sidebar>
If you do not want to install an extra vnStatSVG on another machine, you can install only vnstat, but need a way to copy from the other data to the local host, for example, copied to the local vnstat data directory / var / lib / vnstat .

For example, you can use ssh protocol (you can configure a public key cipher Free login).

# Collect-data.sh
hosts = "tinylab.org"
ifaces = "eth0 eth1"
while:; do
for h in hosts
for i in $ ifaces
scp $ {h}: / var / lib / vnstat / $ {i} / var / lib / vnstat / $ {h} - $ {i}
scp $ {h}: / proc / net / dev> / var / lib / vnstat / $ {h} - $ {i} -second
sleep 5
You can always execute the script or start another cron task to execute the script in the background. This file can be used virtual agreement, following sidebar.xml can achieve the same effects.

< ? Xml version = '1.0'encoding =' UTF-8'standalone = 'no'?>
< Sidebarid = "sidebar">
< -! Thisconfiguration isforsingle host, the hosts anddump_tool field should be the same ->
< Iface>
< Name> eth0 < / name>
< Host> localhost < / host>
< Description> Local Host < / description>
< / Iface>
< Iface>
< Name> tinylab.org-eth0 < / name>
< Host> localhost < / host>
< Description> TinyLab.org:eth0 < / description>
< / Iface>
< Iface>
< Name> tinylab.org-eth1 < / name>
< Host> localhost < / host>
< Description> TinyLab.org:eth1 < / description>
< / Iface>
< / Sidebar>


vnStatSVG indeed is a very small but powerful vnStat web front-end, highly recommended!
- Android custom slideshow menu slidmenu (Programming)
- Linux users should be aware that should the 7 ls command unique skills (Linux)
- First start with Kali Linux 2.0 (Linux)
- How to configure SNMPv3 on Ubuntu, CentOS and Cisco systems (Linux)
- How to use tmpfs in RHEL / CentOS 7.0 (Linux)
- Make Linux more secure server tips (Linux)
- Redmine Installation (Linux)
- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)
- Linux-based Heartbeat high availability configuration httpd service (Server)
- Android Get App version number and version name (Programming)
- Hibernate Search 5.5 in the search results sorted (Linux)
- Making Linux root file system problems on-link library (Programming)
- Ubuntu 14.04 compile and install Apache (Server)
- Oracle to create an external table (Database)
- Setting Hibernate connection MySQL database connection pool coding (Database)
- ActiveMQ5.10.2 version configuration JMX (Linux)
- To install MySQL 5.6 binary packages under CentOS 6.4 64bit (Database)
- MongoDB fragmentation (Cluster) (Database)
- Java object initialization (Programming)
- MySQL database under Linux to achieve automatic backup scheduled backup day (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.