Notice: Undefined index: totalrx in /usr/www/data/vnstat/index.php on line 81
$trx = $summary['totalrx']*1024+$summary['totalrxk'];
$ttx = $summary['totaltx']*1024+$summary['totaltxk'];
Notice: Undefined index: totalrxk in /usr/www/data/vnstat/index.php on line 81
Notice: Undefined index: totaltx in /usr/www/data/vnstat/index.php on line 82
$vnstat_bin = '/usr/local/bin/vnstat';
<?php
error_reporting(E_ALL | E_NOTICE);
$locale = 'en_US.UTF-8';
$language = 'en';
$iface_list = array('tun0', 're0');
$iface_title['tun0'] = 'Internet';
$iface_title['re0'] = 'Local';
$vnstat_bin = '/usr/local/bin/vnstat';
$data_dir = './dumps';
$graph_format='svg';
define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');
define('SVG_FONT', 'Verdana');
define('DEFAULT_COLORSCHEME', 'light');
?>
vnstat -D -u -i rl0
ll -a ./vnstat/
total 22
drwxr-xr-x 3 erfolg wheel 512 17 окт 00:35 .
drwxr-xr-x 8 erfolg wheel 2048 18 окт 22:12 ..
drwxr-xr-x 2 root wheel 512 17 окт 00:40 .dumps
-rw-r--r-- 1 root wheel 2272 23 окт 09:40 .re0
-rw-r--r-- 1 root wheel 2272 23 окт 09:40 .tun0
-rw-r--r-- 1 root wheel 2272 23 окт 09:40 re0
-rw-r--r-- 1 root wheel 2272 23 окт 09:40 tun0
ll -a ./vnstat/.dumps/
total 8
drwxr-xr-x 2 root wheel 512 17 окт 00:40 .
drwxr-xr-x 3 erfolg wheel 512 17 окт 00:35 ..
-rw-r--r-- 1 root wheel 1659 23 окт 09:40 vnstat_dump_re0
-rw-r--r-- 1 root wheel 1643 23 окт 09:40 vnstat_dump_tun0
server801 писал(а):Почему файл руссификации не скачивается? Если есть, выложите пожалуйста
server801 писал(а):Вопрос номер 2 : как заставить его мониторить виртуальные интерфейсы eth0:1 и dummy0 ???
server801 писал(а):и dummy0 ???
<?php
//
// vnStat PHP frontend (c)2006-2010 Bjorge Dijkstra (bjd@jooz.net)
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//
// see file COPYING or at http://www.gnu.org/licenses/gpl.html
// for more information.
//
error_reporting(E_ALL | E_NOTICE);
//
// configuration parameters
//
// edit these to reflect your particular situation
//
$locale = 'ru_RU.UTF-8';
$language = 'ru';
// list of network interfaces monitored by vnStat
$iface_list = array('eth0','dummy0');
//
// optional names for interfaces
// if there's no name set for an interface then the interface identifier
// will be displayed instead
//
$iface_title['eth0'] = 'Internal';
$iface_title['dummy0'] = 'IPTV';
//
// There are two possible sources for vnstat data. If the $vnstat_bin
// variable is set then vnstat is called directly from the PHP script
// to get the interface data.
//
// The other option is to periodically dump the vnstat interface data to
// a file (e.g. by a cronjob). In that case the $vnstat_bin variable
// must be cleared and set $data_dir to the location where the dumps
// are stored. Dumps must be named 'vnstat_dump_$iface'.
//
// You can generate vnstat dumps with the command:
// vnstat --dumpdb -i $iface > /path/to/data_dir/vnstat_dump_$iface
//
$vnstat_bin = '/usr/bin/vnstat';
$data_dir = './dumps';
// graphics format to use: svg or png
$graph_format='svg';
// Font to use for PNG graphs
define('GRAPH_FONT',dirname(__FILE__).'/VeraBd.ttf');
// Font to use for SVG graphs
define('SVG_FONT', 'Verdana');
// Default theme
define('DEFAULT_COLORSCHEME', 'light');
?>
fribezdelnik писал(а):привет всем, кто здесь!
никто не против?! тема не закрыта по vnstat-у еще? вопрос такого характера:Ошибка: Index of/vnstat
установил как тут было сказано.
загрузился с вэб интерфейса, пишет: Index of/vnstat.
Что это может быть?
fribezdelnik писал(а):Скидываю скриншот с ошибкой.
ОС FreeBSD 8.0 стоит.
вэб морда лежит в разделе: "/usr/local/www/vnstat/" делал как было написано у вас по статье.
<?php
phpinfo();
?>
//> cd /usr/ports/lang/php52
/usr/ports/lang/php52/> make config
+--------------------------------------------------------------------+
| Options for php52 5.2.17_1 |
| +----------------------------------------------------------------+ |
| | [X] CLI Build CLI version | |
| | [X] CGI Build CGI version | |
| | [X] APACHE Build Apache module | |
| | [ ] DEBUG Enable debug | |
| | [X] SUHOSIN Enable Suhosin protection system (not for jails) |
| | [ ] MULTIBYTE Enable zend multibyte support | |
| | [ ] IPV6 Enable ipv6 support | |
| | [ ] MAILHEAD Enable mail header patch | |
| | [ ] REDIRECT Enable force-cgi-redirect support (CGI only) | |
| | [ ] DISCARD Enable discard-path support (CGI only) | |
| | [X] FASTCGI Enable fastcgi support (CGI only) | |
| | [X] PATHINFO Enable path-info-check support (CGI only) | |
+-+------v(+)------------------------------------------------------+-+
| [ OK ] Cancel |
+--------------------------------------------------------------------+
/usr/ports/lang/php52/> make install clean
/usr/ports/lang/php52/> rehash
//> apachectl graceful
//> ee /usr/local/www/data/index.php
<?
phpinfo();
?>
//> /usr/local/etc/rc.d/apache restart
//> cd /usr/ports/lang/php52-extensions
/usr/ports/lang/php52-extensions/> make config
+--------------------------------------------------------------------+
| Options for php52-extensions 1.3 |
| +----------------------------------------------------------------+ |
| | [ ] BCMATH bc style precision math functions | |
| | [ ] BZ2 bzip2 library support | |
| | [ ] CALENDAR calendar conversion support | |
| | [X] CTYPE ctype functions | |
| | [X] CURL CURL support | |
| | [ ] DBA dba support | |
| | [ ] DBASE dBase library support | |
| | [ ] DOM DOM support | |
| | [ ] EXIF EXIF support | |
| | [ ] FILEINFO fileinfo support | |
| | [ ] FILTER input filter support | |
| | [ ] FRIBIDI FriBidi support | |
| | [ ] FTP FTP support | |
| | [X] GD GD library support | |
| | [X] GETTEXT gettext library support | |
| | [ ] GMP GNU MP support | |
| | [X] HASH HASH Message Digest Framework | |
| | [X] ICONV iconv support | |
| | [ ] IMAP IMAP support | |
| | [ ] INTERBASE Interbase 6 database support (Firebird) | |
| | [X] JSON JavaScript Object Serialization support | |
| | [ ] LDAP OpenLDAP support | |
| | [ ] MBSTRING multibyte string support | |
| | [ ] MCRYPT Encryption support | |
| | [ ] MHASH Crypto-hashing support | |
| | [ ] MING ming shockwave flash support | |
| | [ ] MSSQL MS-SQL database support | |
| | [X] MYSQL MySQL database support | |
| | [ ] MYSQLI MySQLi database support | |
| | [ ] NCURSES ncurses support (CLI only) | |
| | [ ] ODBC unixODBC support | |
| | [ ] OPENSSL OpenSSL support | |
| | [ ] PCNTL pcntl support (CLI only) | |
| | [X] PCRE Perl Compatible Regular Expression support | |
| | [X] PDF PDFlib support (implies GD) | |
| | [X] PDO PHP Data Objects Interface (PDO) | |
| | [X] PDO_SQLITE PDO sqlite driver | |
| | [ ] PGSQL PostgreSQL database support | |
| | [X] POSIX POSIX-like functions | |
| | [ ] PSPELL pspell support | |
| | [ ] READLINE readline support (CLI only) | |
| | [ ] RECODE recode support | |
| | [X] SESSION session support | |
| | [ ] SHMOP shmop support | |
| | [X] SIMPLEXML simplexml support | |
| | [ ] SNMP SNMP support | |
| | [ ] SOAP SOAP support | |
| | [ ] SOCKETS sockets support | |
| | [ ] SPL Standard PHP Library | |
| | [X] SQLITE sqlite support | |
| | [ ] SYBASE_CT Sybase database support | |
| | [ ] SYSVMSG System V message support | |
| | [ ] SYSVSEM System V semaphore support | |
| | [ ] SYSVSHM System V shared memory support | |
| | [ ] TIDY TIDY support | |
| | [X] TOKENIZER tokenizer support | |
| | [ ] WDDX WDDX support (implies XML) | |
| | [ ] XML XML support | |
| | [X] XMLREADER XMLReader support | |
| | [ ] XMLRPC XMLRPC-EPI support | |
| | [X] XMLWRITER XMLWriter support | |
| | [ ] XSL XSL support (Implies DOM) | |
| | [ ] YAZ YAZ support (ANSI/NISO Z39.50) | |
| | [ ] ZIP ZIP support | |
| | [X] ZLIB ZLIB support | |
+-+------v(+)------------------------------------------------------+-+
| [ OK ] Cancel |
+--------------------------------------------------------------------+
/usr/ports/lang/php52-extensions/> make install clean
/usr/ports/lang/php52-extensions/> rehash
//> apachectl graceful
//> ee /usr/local/etc/apache/httpd.conf
<Directory />
Options FollowSymLinks ExecCGI
AllowOverride None
</Directory>
//> /usr/local/etc/rc.d/apache restart
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 3