despre compartiment
Aici puteti gasi articole in romana despre instalarea, configurarea si administrarea unor servicii precum si a intregului sistem.
login
articole
10.01.08 16:13Using vnstat for simple traffic accounting
Ultima modificare: 10.01.08 16:15
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.

Quick install guide (I have set it up on a Slackware 10.0 box):

[user@host] $ wget http://humdi.net/vnstat/vnstat-1.4.tar.gz
[user@host] $ tar zxvf vnstat-1.4.tar.gz
[user@host] $ cd vnstat-1.4
[user@host] $ make
[user@host] $ su
Password:
[root@host] # checkinstall (or "make install" on most systems)

#create databases for NICs

[root@host] # vnstat -u -i eth0
[root@host] # vnstat -u -i eth1
[root@host] # crontab -e

Add the following entry in the crontab:
*/5 * * * * /usr/bin/vnstat -u

#install the frontend:
[root@host] # cd /var/www/htdocs
[root@host] # wget -O vnstat_php_frontend-1.3.tar.gz http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.3.tar.gz
[root@host] # tar zxvf vnstat_php_frontend-1.3.tar.gz
[root@host] # mv vnstat_php_frontend-1.3 vnstat
[root@host] # nano vnstat/config.php

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';


That's all, assuming apache is properly configured with php enabled, you can access the interface at http://your-domain.com/vnstat/
Remember to protect it with some http authentication if you don't want the whole world to be able to access it :)
Btw, here's a screenshot:






original: http://nixfloyd.blogspot.com/2007/10/using-vnstat-for-simple-traffic.html
Autor: nixfloyd
Comentarii: 0

Adauga Comentariu:
Nume:
E-mail:
Cometariu:
 
counter
Informatia de pe site este prezentata "AS IS" si nimeni NU garanteaza veridicitatea sa
Hosting si intretinerea site-ului - REMSYS © 2003-2007