O'Reilly logo

Web Performance Tuning, 2nd Edition by Patrick Killelea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Network Snooping Tools

Do you ever wish you could see what’s going across your network connection? The snoop utility that comes bundled with Solaris will show you exactly what’s being transmitted across your segment of the network. You have to be root to run it because it allows you to see absolutely everything, down to the content of the packets. tcpdump is a similar utility from the Stevens TCP/IP book with source code available from ftp://ftp.uu.net/. etherfind is another similar tool.

netstat

netstat shows the status of network connections. This is very valuable for determining which connections are up and whether you are wasting a lot of memory holding connection buffers for unused connections. On Linux, netstat -c will start displaying an updated network status every second, which is very instructive if you make a few requests from your browser while running it. Here’s some sample output from netstat:

% netstat -at Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (State) User tcp 0 0 *:700 *:* LISTEN root tcp 0 0 *:netbios-ssn *:* LISTEN root tcp 0 0 *:nntp *:* LISTEN root tcp 0 0 *:auth *:* LISTEN root tcp 0 0 *:6000 *:* LISTEN patrick tcp 0 0 *:sunrpc *:* LISTEN root tcp 0 0 *:pop3 *:* LISTEN root tcp 0 0 *:www *:* LISTEN root tcp 0 0 *:finger *:* LISTEN root tcp 1 0 cn2.cab:1584 nik.null.com:www CLOSE_WAIT patrick tcp 1 0 cn2.cab:1580 nik.null.com:www CLOSE_WAIT patrick tcp 1 0 cn2.cab:1579 nik.null.com:www CLOSE_WAIT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required