Traffic Monitoring ? aber wie?

Also ich habe mal folgendes gemacht

pico /usr/bin/vnstat

(das sind auch nur wirre zeichen zuerkennen)

und nach der variabel gesucht -> $iface_list = array('eth0');

konnte sie aber nirgends finden
 
Hallo!
Ersetzte vnstat -u -i eth0 durch vnstat -u -i venet0. Denn dein Interface heist ja venet0 und nicht eth0.

PS : Den Programmcode mit einem Editor zu bearbeiten ist keine gute Idee.

mfG
Thorsten
 
was muss ich noch angeben
ist so alles ok ?

<?php
//
// vnStat PHP frontend 1.3 (c)2006-2007 Bjorge Dijkstra ([email protected])
//
// 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 GNU General Public License - GNU Project - Free Software Foundation (FSF)
// for more information.
//

//
// configuration parameters
//
// edit these to reflect your particular situation
//

// list of network interfaces monitored by vnStat
$iface_list = array('venet0', 'eth1', 'sixxs');

//
// 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['eth1'] = 'Internet';
$iface_title['sixxs'] = 'SixXS IPv6';

//
// 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 = '';
$data_dir = './dumps';
?>

Und die PHP File einfach irgendwo hoch auf dem webspace stimmts?
 
PHP:
<?php
    //
    // vnStat PHP frontend 1.3 (c)2006-2007 Bjorge Dijkstra ([email protected])
    //
    // 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 [url=http://www.gnu.org/licenses/gpl.html]GNU General Public License - GNU Project - Free Software Foundation (FSF)[/url] 
    // for more information.
    //

    //
    // configuration parameters
    //
    // edit these to reflect your particular situation
    //

    // list of network interfaces monitored by vnStat
    $iface_list = array('venet0');

    //
    // optional names for interfaces
    // if there's no name set for an interface then the interface identifier
    // will be displayed instead
    //    
    $iface_title['venet0'] = 'Internal';
    // $iface_title['eth1'] = 'Internet';
    // $iface_title['sixxs'] = 'SixXS IPv6';

    //
    // 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';
?>
Eventuell solltest du $data_dir auf irgendein für den Webbenutzer beschreibbares, temporäres Verzeichnis legen. Kenne aber deine Konfiguration nicht. Setzt dich bitte etwas Intensiver mit der Thematik Linux auseinander. Das sind eigentlich alles recht simple Grundlagen, die du verstehen musst, wenn du einen Server betreibst.

mfG
Thorsten
 
ja aber wie bekomme ich safe mode aus

ich habe schon in der php.ini nach gesehen da ist es aus

es ist irgendwie nur lokal an


aber wie bekomme ich es aus


PS: Server4You Traffic anzeige funzt nicht
 
Last edited by a moderator:
finde das menu nicht :-d


ok habe das menü aber wie schalte ich da jetzt die safe_mode aus ???
 
Last edited by a moderator:
Hey
habe folgendes eingegeben php safemode admin off

aber ich bekomme die safe_mode einfach nicht aus
 
Hallo!
Wie bereits gesagt, das sind zum großen Teil Grundlagen.
Code:
php_admin_flag safe_mode off

mfG
Thorsten
 
Ja ok danke dir

Server war nochmal zwischenzeitlich down aufgrund Fehleinstellungen aber nu scheint alles zu funktionieren


Danke nochmals für die Hilfe
 
Huhu :)

Ich weiß, dass der Beitrag Uralt, aber meine Frage passt hier ein bisschen zu...

Ich habe soeben vnStat installiert und das funktioniert auch wirklich toll.

Aaaaber: Ich würde gerne den Traffic für einzelene Anwendungen, Protokolle oder TCP/UDP Ports monitoren.

zB:
Gesamt In-Traffic: 22GB
Davon
- Teamspeak Port XXX: 12 GB
- FTP 21: 2 GB
- HTTP 80: 3 GB

usw...

Hat jemand eine Idee?
 
Back
Top