Linux performance analysis tool-vnstat

Source: Internet
Author: User
The linux performance analysis tool vnstatvnStat 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 is a network traffic monitoring software in linux. it 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. Official website of vnStat: http://humdi.net/vnstat/ Currently the latest is the 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 the 64-bit platform is compiled with make 64bit command so that vnstat is installed. The following describes how to configure vnstat. Download the latest vnstat PHP frontend. URL: http://soft.vpser.net/status/vnstat/vnstat_php_frontend-1.5.1.tar.gz Decompress the file, change it to vnstat, and upload it to the root directory of a website. http://www.vpser.net/vnstat When asked, the page is displayed, 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 < /Var/lib/vnstat/vnstat_dump_eth0 EOF and then execute: crontab-e and add the execution 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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.