HP-UX TCP/IP Performance White Paper, March 2008

31
6 Monitoring Network Performance
There are many tools available on HP-UX for monitoring network statistics. Of these tools, netstat(1)
and lanadmin(1M) are very useful to monitor network statistics especially to identify the following
conditions which may potentially have an impact on network performance:
Retransmissions
Out-of-order packets
Window probes
Duplicate Acks
Ack-only packets
Bad Checksums
Dropped Fragments
UDP socket buffer overflows
Inbound packet discards/errors
Outbound packet discards/errors
Packet Collisions
6.1 Monitoring network statistics
The netstat command displays statistics for network interfaces and protocols. The output format varies
according to the options selected.
The netstat command without any options displays all active internet connections and all active UNIX
domain sockets. This is useful for tracking what connections are being used on the system at any point in
time. Using the -a option shows the state of all sockets, active or not, this option will be useful since one
can observe all the listen sockets too.
The netstat -i command shows statistics for all interfaces. It shows MTU size for each network interface,
and number of inbound and outbound packets processed.
The netstat -s command provides statistics for all the protocols like TCP, UDP, IPv4, ICMP, IGMP, IPv6
and ICMPv6.
To diagnose networking problems, it is best to use data collected over an interval and not all the statistics
since boot. There is an unofficial tool called beforeafter which can be used to subtract one set of
netstat statistics from another. This tool can be retrieved via the URL:
ftp://ftp.cup.hp.com/dist/networking/tools/beforeafter.c
Typically, one might use beforeafter as follows:
# netstat -s > before
# do something or sleep for a time
# netstat -s > after
# beforeafter before after > delta
# more delta