vnstat
可以統計網卡流量可惜不含ip分析
安裝vnstat
1.
wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
2.
yum -y install vnstat
rm -rf /etc/cron.d/vnstat
touch /var/lib/vnstat/dump.sh
vnstat -u -i eth0
vnstat -dumpdb -i eth0 >/var/lib/vnstat/vnstat_dump_eth0
crontab -e
* * * * * /bin/sh /var/lib/vnstat/dump.sh
指令vnstat -i eth0
目前流量vnstat -l
VNStat PHP Frontend
wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz
tar zxvf vnstat_php_frontend-1.5.1.tar.gz
mv vnstat_php_frontend-1.5.1 vnstat
rm -rf vnstat_php_frontend-1.5.1.tar.gz
config.php
$language = 'en';
$iface_list = array('eth0');
//$iface_title['sixxs'] = 'SixXS IPv6';
$vnstat_bin = '/usr/bin/vnstat';
$data_dir = '/var/lib/vnstat/';
$graph_format='png';
http://domain.name/vnstat
vnstat.cgi
網路上找vnstat.cgi
cp vnstat.cgi /var/www/cgi-bin/
chmod +x vnstat.cgi
wget http://flexbox.sourceforge.net/centos/5/i386/vnstati-1.11-1.el5.i386.rpm
vim /var/www/cgi-bin/vnstat.cgi
http://140.113.40.35/cgi-bin/vnstat.cgi
http://www.vpseek.com/newbies-guides/configure-vnstat-on-centos-to-montior-bandwidth-usage.html
留言列表