Problem solve Get help with specific problems with your technologies, process and projects.

Measuring network throughput in Unix

Some useful utilities for measuring throughput in Unix.

It's a good idea to measure how much throughput a particular connection is capable of. Projects that rely on a...

particular type of connection such as modems and ISDN lines require that sort of measurement when you consider capacity planning. Fortunately Unix offers several packages that help you figure this out.

The first utility you might want to try is the SPRAY command. SPRAY works by running the SPRAYD daemon on a remote system. Then you can command SPRAY to communicate with the host you are measuring to determine the amount of traffic that gets through vs. the amount of traffic that was initially generated. SPRAY indicates the number of packets passed in a specific elapsed time. Since the SPRAY daemon saturates a network segment when it runs, you'll want to limit your use of this utility to off hours so that your clients aren't affected. SPRAY essentially will lock out other users with what amounts to a Denial of Service attack.

The second useful tool for measuring throughput is the STATNET command. What STATNET does is to query the kernel to get I/O traffic statistics. STATNET will show you the different kinds of network traffic that you might have such as TCP, NetBEUI, ARP, UDP, ICMP, AppleTalk and others as a percentage of total traffic. You can determine different routes packets take using the TRACEROUT utility, which can be useful in determining throughput indirectly when you know the amount of information that was transferred. However, TRACEROUT is really only an indirect measure of the bandwidth of a particular set of routes. While SNMP tools are commonly used to measure connectivity, those tools are really only useful for discovery and profile of network nodes and devices, less so for the quality of the wire between them.

Barrie Sosinsky is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.

This was last published in January 2004

Dig Deeper on Network Infrastructure