====== iftop ====== ===== Installation ===== sudo aptitude install iftop (autre soft qui permet de monitorer **iptraf**) ===== Les options ===== * -h Affiche les options * -n Pas de résolution de nom * -N Pas de convertion de nom pour les ports * -p En mode promiscuous (affiche le traffic vers les autres hostes sur le meme segment réseau) * -b N'affiche pas une bar de traffic * -B Affiche la bande passante en octets * -i interface Ecoute sur l'interface nommée * -f filter code Utilise un filtre pour selectionner les packets compter (defaut: aucun, seul les packet IP sont comptés) * -F net/mask Affiche le flu de traffic réseau en entrée/sortie du réseau * -P Affiche les ports ainsi que les hotes * -m limit Affiche la bande passante dépassant cet limite * -c config file Spicifie un fichier de configuration alternatif ===== iftop ===== Il faut être root pour lancer iftop. exemple: sudo iftop -i eth0 -n * Par protocole : iftop -f icmp iftop -f tcp iftop -f udp * Par réseau : iftop -F 192.168.1.0/24 * Par ports : iftop -f 'port 80' iftop -f 'not port domain' * Par host : iftop -f 'host webcache.example.com' * Divers : iftop -f 'port http and not host webcache.example.com' ===== nethogs ===== Monitore la bande passante par processus. nethogs -i eth0 25110 www-data python eth0 464.267 9.722 KB/sec 24484 www-data python eth0 3.055 3.188 KB/sec 22424 www-data python eth0 33.251 1.388 KB/sec 24625 www-data apache2 eth0 0.123 0.575 KB/sec 24538 www-data python eth0 0.090 0.153 KB/sec 25603 www-data apache2 eth0 0.011 0.023 KB/sec 26217 www-data apache2 eth0 0.011 0.023 KB/sec 25126 www-data apache2 eth0 0.011 0.023 KB/sec 21747 www-data apache2 eth0 0.011 0.023 KB/sec 25629 www-data apache2 eth0 0.011 0.023 KB/sec 24506 www-data python eth0 0.000 0.000 KB/sec 24465 www-data python eth0 0.000 0.000 KB/sec ====== pktstat ====== pktstat -i eth0 -n -t pktstat -i eth0 -n -t "port 80" Example output: interface: eth0 bps % desc 695.0k 22% tcp 207.46.13.28:80 <-> 192.168.78.242:1917 └ GET /msdownload/update/v3-19990518/cabpool/windowsmedia-kb911564- 531.0k 17% tcp 207.46.13.28:80 <-> 192.168.78.242:1918 └ GET /msdownload/update/v3-19990518/cabpool/windowsxp-kb923689-x86 181.2k 5% tcp 192.168.78.242:49175 <-> 78.117.211.178:7480 86.6k 2% tcp 192.168.78.242:58282 <-> 79.85.212.131:22 41.0k 1% tcp 192.168.78.242:2951 <-> 89.88.152.10:80 32.7k 1% tcp 192.168.78.242:3143 <-> 89.88.152.10:80