vnstat 모니터링 (웹페이지용)
리눅스/Network2015. 1. 26. 17:50
반응형
vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface(s). vnStat isn’t a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions. However at least a 2.2.x kernel is required.
- Install vnStat
wget http://humdi.net/vnstat/vnstat-1.7.tar.gz
tar zxvf vnstat-1.7.tar.gz
cd vnstat-1.7
make
make install - Create databases for NICs
vnstat -u -i eth0
vnstat -u -i eth1 - Set a cronjob to check bandwidth usage
Add a crontab job entry for vnStat.
crontab -e
and add the following line
*/5 * * * * /bin/vnstat -u - Install the frontend
cd /var/www/ <- DocumentRoot 디렉토리
wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.4.1.tar.gz
tar zxvf vnstat_php_frontend-1.4.1.tar.gz
mv vnstat_php_frontend-1.4.1 vnstat
Edit vnstat/config.php and adjust the following lines to your preference:$iface_list = array('eth0', 'eth1');
$iface_title['eth0'] = 'Extern';
$iface_title['eth1'] = 'Intern';
$vnstat_bin = '/usr/bin/vnstat';
Finally we open our browser and type
You should see something like this
vnstat
반응형
'리눅스 > Network' 카테고리의 다른 글
iptables 나가는 IP 또는 포트 차단 (0) | 2015.01.26 |
---|---|
iptables 특정 IP 및 대역 차단과 해제 (0) | 2015.01.26 |
vnstat (트래픽 모니터링 툴) (0) | 2015.01.26 |
실시간으로 서버 트래픽 확인하는 스크립트 (0) | 2015.01.26 |
CentOS 6 에서 본딩 (bonding) 구성 (0) | 2015.01.26 |
댓글()