9.2. Monitoring and Diagnosing Performance Problems
Red Hat Enterprise Linux 7 provides a number of tools that are useful for monitoring system performance and diagnosing performance problems related to the networking subsystem. This section outlines the available tools and gives examples of how to use them to monitor and diagnose network related performance issues.
ss is a command-line utility that prints statistical information about sockets, allowing administrators to assess device performance over time. By default, ss lists open non-listening TCP sockets that have established connections, but a number of useful options are provided to help administrators filter out statistics about specific sockets.
Red Hat recommends ss over netstat in Red Hat Enterprise Linux 7.
ss is provided by the iproute package. For more information, see the man page:
$ man ss
The ip utility lets administrators manage and monitor routes, devices, routing policies, and tunnels. The
ip monitorcommand can continuously monitor the state of devices, addresses, and routes.
ip is provided by the iproute package. For details about using ip, see the man page:
$ man ip
Dropwatch is an interactive tool that monitors and records packets that are dropped by the kernel.
For further information, see the dropwatch man page:
$ man dropwatch
The ethtool utility allows administrators to view and edit network interface card settings. It is useful for observing the statistics of certain devices, such as the number of packets dropped by that device.
You can view the status of a specified device's counters with
ethtool -Sand the name of the device you want to monitor.
$ ethtool -S devname
For further information, see the man page:
$ man ethtool
/proc/net/snmpfile displays data that is used by snmp agents for IP, ICMP, TCP and UDP monitoring and management. Examining this file on a regular basis can help administrators identify unusual values and thereby identify potential performance problems. For example, an increase in UDP input errors (
/proc/net/snmpcan indicate a bottleneck in a socket receive queue.
9.2.6. Network Monitoring with SystemTap
The Red Hat Enterprise Linux 7 SystemTap Beginner's Guide includes several sample scripts that are useful for profiling and monitoring network performance.
The following SystemTap example scripts relate to networking and may be useful in diagnosing network performance problems. By default they are installed to the
- Every 5 seconds, prints a list of processes (process identifier and command) with the number of packets sent and received and the amount of data sent and received by the process during that interval.
- Instruments each of the functions in the Linux kernel's
net/socket.cfile, and prints trace data.
- Every 5 seconds, prints the number of socket buffers freed at locations in the kernel. Use the
--all-modulesoption to see symbolic names.
latencytap.stpscript records the effect that different types of latency have on one or more processes. It prints a list of latency types every 30 seconds, sorted in descending order by the total time the process or processes spent waiting. This can be useful for identifying the cause of both storage and network latency. Red Hat recommends using the
--all-modulesoption with this script to better enable the mapping of latency events. By default, this script is installed to the
For further information, see the Red Hat Enterprise Linux 7 SystemTap Beginners Guide.