Iperf és una eina que permet fer tests de velocitat (throughput) entre un client i un servidor. Proporciona les eines tant per al client com per al servidor.
$ sudo apt-get install iperf
$ iperf -s
[email protected]:~$ iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 39892 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 0.0 sec 0.00 Bytes 0.00 bits/sec [ 5] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 39948 [ 5] 0.0-10.0 sec 9.57 GBytes 8.21 Gbits/sec [ 4] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 39960 [ 4] 0.0-10.0 sec 13.3 GBytes 11.4 Gbits/sec
$ iperf -c
[email protected]:~$ iperf -c localhost ------------------------------------------------------------ Client connecting to localhost, TCP port 5001 TCP window size: 49.5 KByte (default) ------------------------------------------------------------ [ 3] local 127.0.0.1 port 39948 connected with 127.0.0.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 9.57 GBytes 8.22 Gbits/sec
[email protected]:~$ iperf -c localhost -m ------------------------------------------------------------ Client connecting to localhost, TCP port 5001 TCP window size: 49.5 KByte (default) ------------------------------------------------------------ [ 3] local 127.0.0.1 port 40039 connected with 127.0.0.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 10.0 GBytes 8.59 Gbits/sec [ 3] MSS size 16384 bytes (MTU 16424 bytes, unknown interface)
Variabilitat temporal durant l'enviament de senyals digitals, una lleugera desviació de l'exactitud del senyal de rellotge
$ sudo apt-get install smokeping ... S'instaŀlaran els següents paquets extres: echoping fping javascript-common libconfig-grammar-perl libdbi1 libdigest-hmac-perl libio-socket-inet6-perl libjs-cropper libjs-prototype libjs-scriptaculous librrd4 librrds-perl libsnmp-session-perl libsocket6-perl speedy-cgi-perl ttf-dejavu wwwconfig-common ... Not creating home directory `/var/lib/smokeping'. enabling Apache configuration in /etc/apache2/conf.d/smokeping * Reloading web server config apache2 [ OK ] Creating config file /etc/smokeping/basepage.html with new version Creating config file /etc/smokeping/smokemail with new version Creating config file /etc/smokeping/tmail with new version Creating config file /etc/smokeping/config.d/Alerts with new version Creating config file /etc/smokeping/config.d/Database with new version Creating config file /etc/smokeping/config.d/General with new version Creating config file /etc/smokeping/config.d/Presentation with new version Creating config file /etc/smokeping/config.d/Probes with new version Creating config file /etc/smokeping/config.d/Slaves with new version Creating config file /etc/smokeping/config.d/Targets with new version Creating config file /etc/smokeping/config.d/pathnames with new version Creating config file /etc/smokeping/config with new version Starting latency logger daemon smokeping
Smokeping és una aplicació web
http://IP/smokeping/smokeping.cgi
Per exemple i podeu accedir amb:
http://localhost/smokeping/smokeping.cgi
La carpeta on estan els fitxers web és:
$ ls /usr/share/smokeping/www/ images javascript
$ cat /etc/smokeping/config @include /etc/smokeping/config.d/General @include /etc/smokeping/config.d/Alerts @include /etc/smokeping/config.d/Database @include /etc/smokeping/config.d/Presentation @include /etc/smokeping/config.d/Probes @include /etc/smokeping/config.d/Slaves @include /etc/smokeping/config.d/Targets
$ cat /etc/smokeping/config.d/Targets ** Targets ** probe = FPing ## You have to edit and uncomment all what you want below this. # Please, refer to smokeping_config man page for more info # The given adresses aren't real to avoid DoS. menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website of 'A poorly \ mantained site running Debian.' + Local menu = Local title = Local Network ++ LocalMachine menu = Local Machine title = This host host = localhost
En aquest arxiu podem crear nous hosts i que surtin en el menú de l'esquerra.
Exemple:
+ Companys menu = Companys title = PCs Companys ++ Borja menu = Borja title = PC Borja host = 192.168.202.223
Comanda principal
$ sudo fping 8.8.8.8
Manual
$ man fping
Per enviar mes paquets per segon
$ fping -c 20 8.8.8.8
$ fping -c 20 -p 20 8.8.8.8
Llista de missatges de control permesos (incompleta):
[email protected]:~$ ping -M do -s 1472 www.iesebre.com PING www.iesebre.com (192.168.0.9) 1472(1500) bytes of data. 1480 bytes from www.iesebre.com (192.168.0.9): icmp_req=1 ttl=63 time=0.858 ms 1480 bytes from www.iesebre.com (192.168.0.9): icmp_req=2 ttl=63 time=0.872 ms 1480 bytes from www.iesebre.com (192.168.0.9): icmp_req=3 ttl=63 time=0.925 ms 1480 bytes from www.iesebre.com (192.168.0.9): icmp_req=4 ttl=63 time=0.990 ms
Per tant amb 1472 tenim que el MTU màxim hauria de der 1500:
1472 (mida del ping) + 8 bytes (capçalera ICMP) + 20 bytes (Capçalera IP)
Per instal·lar ntop en un sistema Debian/Ubuntu:
$ sudo apt-get install ntop
La instal·lació crea un usuari específic del sistema (usuari ntop). Aquest és l'usuari que correrà l'aplicació ntop.
Un cop instal·lat és necessari que configurem ntop:
$ sudo dpkg-reconfigure ntop