Linux performance analysis tool vnstat vnStat is a network traffic monitoring software in Linux that records the daily transmission traffic logs of the specified network adapter. Instead of filtering network packets, it analyzes the file system-/proc, so vnStat can be used without the root permission. VnStat Official Website: http://humdi.net/vnstat/currently the latest license vnstat-1.10.tar.gz below to talk about the specific installation steps: Download: wget http://humdi.net/vnstat/vnstat-1.10.tar.gz unzip: tar xvzf vnstat-1.10.tar.gz into the Directory: cd vnstat-1.10/compile installation: make install if compiled on the 64-bit platform, use the make 64bit command to install vnstat. The following describes how to configure vnstat. Download the latest version of vnstat PHP frontend, address: http://soft.vpser.net/status/vnstat/vnstat_php_frontend-1.5.1.tar.gz decompression file, renamed vnstat, and then uploaded to the root directory of a website, so you can access the http://www.vpser.net/vnstat asked, it is out of the page, but there is no data at this time, because the system must generate data. Create a traffic database: ifconfig command to view the network card to be monitored. Assume that only eth0 is used to generate the database:/usr/bin/vnstat-u-I eth0 and then update the database regularly. The cron method is used: in fact, the cron of vnstat has been installed in the system when vnstat is installed. The crontab content is in/etc/cron. d/vnstat. If the command touch/etc/cron is not used. d/vnstat creation. Content: 0-55/5 ***** root vnstat-u-I eth0 0-55/5 ***** root vnstat -- dumpdb-I eth0>/var/lib/vnstat/vnstat_dump_eth0 first behavior Installation automatically specified. the second line is to update the eth0 data and dump out a file to access the php access interface. here, the vnstat_dump_eth0 file name is specified by dump. # Note: Sometimes the above collection method cannot collect data. You can use the following method cat>/var/lib/vnstat/dump. sh <EOF vnstat-u-I eth0 vnstat -- dumpdb-I eth0>/var/lib/vnstat/vnstat_dump_eth0 EOF and then execute: add crontab-e to execute command */5 *** sh/var/lib/vnstat/dump. sh and then delete the original cron rm/etc/cron of vnstat. d/vnstat config in the vnstat_php_frontend-1.5.1.tar.gz package. php. Finally, edit vnstat/config. in the php file, change the data directory to/var/lib/vnstat/. If this directory does not exist, use mkdir-p/var/lib/vnstat/to create this directory. That is, $ data_dir = '/var/lib/vnstat/'. Specify the title $ iface_title ['eth0'] = 'vpser-linode'. The following figure shows the image format, it can be svg or png. Generally, you can select png. svg requires plug-ins to be installed in IE, which is not required in Firefox. png can be directly displayed in IE or Firefox. $ Graph_format = 'png '; specifies the installation directory of vnstat. to install the above method, enter the following. $ Vnstat_bin = '/usr/bin/vnstat'; Specify one Nic to be monitored: // list of network interfaces monitored by vnStat // $ iface_list = array ('eth0', 'eth1', 'sixxs'); $ iface_list = array ('eth0 ′,); // will be displayed instead // $ iface_title ['eth0'] = 'internal'; // $ iface_title ['eth1'] = 'internet '; // $ iface_title ['sixxs'] = 'sixxs IPv6 '; after all this is done well, we can use www.mydomain.com/vnstat/ to check the statistics. The new data is updated every 5 minutes.