Netwatch

Netwatch is a small Python script to dump the output of netstat when certain network traffic is seen.

Netwatch 1.0 - Sat, 27 Aug 2005 14:44:43 +0200

Some time ago, I saw some network traffic that I couldn't quite place. The problem was that when I saw it, I was too late to do a 'netstat', since the program generating the traffic would have stopped already. This really started to annoy me, so I wrote this little helper program.

It works like this: it executes tcpdump with a certain filter on it. Of course, you can define this filter yourself in the code. On every line of output from tcpdump, it executes a netstat command and stores the output in a file. When it has a few dumps, you can examine the files and find out which program causes the traffic!