Table des matières

iftop

Installation

sudo aptitude install iftop

(autre soft qui permet de monitorer iptraf)

Les options

iftop

Il faut être root pour lancer iftop.

exemple:

sudo iftop -i eth0 -n

  * Par protocole :
<code>
iftop -f icmp
iftop -f tcp
iftop -f udp
iftop -F 192.168.1.0/24
iftop -f 'port 80'
iftop -f 'not port domain'
iftop -f 'host webcache.example.com'

  * Divers :
<code>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