Monitorització del trànsit

De Guifi.net - Wiki Català

iptraf

$ sudo apt-get install iptraf
$ sudo iptraf

ipband

$ sudo apt-cache show ipband
Description: daemon for subnet bandwidth monitoring with reporting via email
This is a daemon which can monitor as many different subnets (or individual
hosts, by specifying a "subnet" of /32) as you'd like. The reporting facility
will only be triggered when a defined bandwidth level had been exceeded for a
defined time.
.
Information reported includes the connections which are taking up the most
bandwidth (ip address and port pairs). Reporting is done via email.
Homepage: http://ipband.sourceforge.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

ipfm

$ sudo apt-cache show ipfm
Description: a bandwidth analysis tool
IPFM counts how much data was sent and received by specified hosts through
an Internet link.

bwm. Bandwidth monitor

$ sudo apt-get install bwm
$ sudo bwm

bwm-ng

$ sudo apt-get install bwm-ng

cutter. Tallar una connexió no desitjada

$ sudo apt-get install cutter

Permet tallar una connexió:

$ cutter 200.1.2.3 22 10.10.0.45 32451

ethstats

Permet consultar el throughput:

$ sudo apt-get install ethstats
$ sudo ethstats
total: 0.01 Mb/s In 0.00 Mb/s Out - 7.0 p/s In 5.0 p/s Out
eth0: 0.01 Mb/s In 0.00 Mb/s Out - 7.0 p/s In 5.0 p/s Out
eth1: 0.00 Mb/s In 0.00 Mb/s Out - 0.0 p/s In 0.0 p/s Out

ethstatus

$ sudo apt-get install ethstatus

NTOP

Consulteu NTOP

bandwidthd

$ sudo apt-get install bandwidthd

Un cop instal·lat podeu consultar les gràfiques (pàgines HTML) accedint a:

file:///var/lib/bandwidthd/htdocs/index.html

Amb el Navegador web.

Fitxer de configuració:

$ cat /etc/bandwidthd/bandwidthd.conf

netacct

Permet tenir un log de l'ús de xarxa per IPs

$ sudo apt-get install net-acct

És un dimoni que s'encarrega de crear els fitxers de lo de la carpeta /var/log/net-acct:

$ cat /var/log/net-acct/net-acct.log

Slurm

Instal·lació:

$ sudo apt-get install slurm 

Execució:

$ sudo slurm -d 1 -i eth0

netstat

$ sudo netstat -i
$ netstat -s | head

Consulteu l'article netstat.

ngrep

Instal·lació:

$ sudo apt.get install ngrep

Ús:

$ sudo ngrep -W byline port 80

vnstat

Instal·lació:

$ sudo apt-get install vnstat

Crear una base de dades:

$ sudo vnstat -u -i eth0

Consultar els informes:

$ vnstat --days

netperf

Cal instal·lar netperf tant en el client com en un servidor:

$ sudo apt-get install netperf

Utilitza el port 12865

$ sudo nmap localhost -p 12865

Starting Nmap 4.53 ( http://insecure.org ) at 2008-11-25 12:44 CET
Interesting ports on localhost (127.0.0.1):
PORT      STATE SERVICE
12865/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.139 seconds

Des de un client podem consultar quina és:

$ netperf -H localhost
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost (127.0.0.1) port 0 AF_INET
Recv   Send    Send                          
Socket Socket  Message  Elapsed              
Size   Size    Size     Time     Throughput  
bytes  bytes   bytes    secs.    10^6bits/sec  

87380  16384  16384    10.00    3419.88

Vegeu també:

Recursos

Eines de l'usuari