Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ vnStatSVG: traffic monitoring software vnStat     - OpenGL Superb Learning Notes - Depth Texture and Shadows (Programming)

- Lua non-blocking write log (Programming)

- SSH without password (Linux)

- Android Custom View step (Programming)

- Attic-- delete duplicate data backup program (Linux)

- C ++ Object Model Comments (Programming)

- Linux crontab use (Linux)

- RedHat Linux 6.4 installation RTL8188CUS wireless network card driver (Linux)

- Oracle PLS-00231 error analysis (Database)

- Ora-00600 [fast hot Atkins soft _ that _ Oh, of course not _less_ profile] (Database)

- Linux kernel socket protocol stack routing lookup cache mechanism (Linux)

- Java open source monitoring platform Zorka basic use (Linux)

- Linux install Eclipse for C / C ++ Development (Linux)

- MongoDB fragmentation (Cluster) (Database)

- To disable the function by pressing Ctrl-Alt-Del to restart the system in RHEL / CentOS 5/6 (Linux)

- The correct method to modify the maximum number of concurrent connections Tomcat 7 (Server)

- How to Install lightweight Budgie desktop on Ubuntu 14.04 (v8) (Linux)

- When Vim create Python scripts, vim autocomplete interpreter and encoding method (Programming)

- Hutchison DG standby database CPU consumption reached bottleneck repair (Database)

- LAN Deployment Docker-- from scratch to create your own private warehouse Docker (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
do
for i in $ ifaces
do
scp $ {h}: / var / lib / vnstat / $ {i} / var / lib / vnstat / $ {h} - $ {i}
scp $ {h}: / proc / net / dev> / var / lib / vnstat / $ {h} - $ {i} -second
done
done
sleep 5
done
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>
 

summary

vnStatSVG indeed is a very small but powerful vnStat web front-end, highly recommended!
     
         
         
         
  More:      
 
- Nginx + Tomcat static and dynamic load balancing and separation configuration essentials under Linux (Server)
- Calling Qt libraries to implement functional processes of some summary (Programming)
- Ubuntu 14.04 install PostgreSQL 9.2 (Database)
- Java heap (Heap) and stack difference (Programming)
- The most simple drive to write and test procedures under linux (Programming)
- Elasticsearch Kibana installation notes (Linux)
- Common DDOS attacks (Linux)
- SQL Server memory Misunderstanding (Database)
- Simple solution CC attack under Linux VPS (Linux)
- Java data structures - order linear form of table ArrayList (Programming)
- Android thread mechanism --AsyncTask (Programming)
- Linux Log (Linux)
- Mhddfs: multiple smaller partitions into one large virtual storage (Linux)
- command-line tool for send e-mail (Linux)
- Spring AOP custom annotation way to achieve log management (Programming)
- The hashcode method of Java (Programming)
- installation and configuration of the PHP environment (Apache2) under Linux (Server)
- Linux Shell Scripting Interview Question (Linux)
- STL source code analysis - iterator each container classification (Programming)
- Ubuntu 14.04 forget solution root password (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.