DevKB
Web Development Knowledge Base
HOME | TOP 20 | WRITE AN ARTICLE |
Sections :



RSS RSS Feed

You too, please publish your useful code snippets in any programming language :
write an article !


Valid HTML 4.0 Transitional

Plateforme d'envoi de gros fichiers en ligne
Dépannage site web
Blog infogérance
Hébergement e-mail

Olivier Ligny - - 12/03/2008 - vue 7637 fois

Surveiller les connexions en cours sur un serveur Linux

Voici une astuce pour surveiller toutes les connexions TCP en cours sur un serveur Linux, que ce soit les connexions au serveur web (port 80), SSH, ou autre ... vous pourrez même voir le débit en cours sur chaque connexion en ko/sec.

Utilisez l'outil TCPTrack : http://www.rhythm.cx/~steve/devel/tcptrack/
Connectez vous en SSH sur votre serveur, puis :
Sous Debian, utilisez la commande : apt-get install tcptrack
Sous Fedora : yum install tcptrack

Une fois installé, pour un plus grand confort d'utilisation, faites un raccourci avec par exemple :
echo "tcptrack -i eth0" > /usr/bin/tt
chmod +x /usr/bin/tt

Vous pourrez ensuite lancer tcptrack en tapant simplement la commande : tt

Si vous ne voulez pas du raccourci, la commande à lancer est donc : tcptrack -i eth0 (pour surveiller l'interface eth0)

---

tcptrack is a sniffer which displays information about TCP connections it sees on a network interface. It passively watches for connections on the network interface, keeps track of their state and displays a list of connections in a manner similar to the unix 'top' command. It displays source and destination addresses and ports, connection state, idle time, and bandwidth usage. The following screenshot explains a lot :




Write a comment :
Your name :     E-mail (optional) :

AntiSpam : what animal is visible on this picture ? :

Nos partenaires : iPhone 8 Cases & Protection