1.1. Observability ToolsThe commands, tools, and utilities used for observing system performance and behavior can be categorized in terms of the information they provide and the source of the data. They include the following.
In combination, these utilities constitute a rich set of tools that provide much of the information required to find bottlenecks in system performance, debug troublesome applications, and even help determine what caused a system to crashafter the fact! But which tool is right for the task at hand? The answer lies in determining the information needed and matching it to the tools available. Sometimes a single tool provides this information. Other times you may need to turn detective, using one set of tools, say, DTrace, to dig out the information you need in order to zero in on specific areas where other tools like MDB can perform in-depth analysis. Determining which tool to use to find the relevant information about the system at hand can sometimes be as confusing to the novice as the results the tool produces. Which particular command or utility to use depends both on the nature of the problem you are investigating and on your goal. Typically, a systemwide view is the first place to start (the "stat" commands), along with a full process view (prstat(1)). Drilling-down on a specific process or set of processes typically involves the use of several of the commands, along with dtrace and/or MDB. 1.1.1. Kstat ToolsThe system kernel statistics utilities (kstats) extract information continuously maintained in the kernel Kstats framework as counters that are incremented upon the occurrence of specific events, such as the execution of a system call or a disk I/O. The individual commands and utilities built on kstats can be summarized as follows. (Consult the individual man pages and the following chapters for information on the use of these commands and the data they provide.)
The utilities listed above extract data values from the underlying kstats and report per-second counts for a variety of system events. Note that the exception is netstat(1), which does not normalize values to per-second rates but rather to the per-interval rates specified by the sampling interval used on the command line. With these tools, you can observe the utilization level of the system's hardware resources (processors, memory, disk storage, network interfaces) and can track specific events systemwide, to aid your understanding of the load and application behavior. 1.1.2. Process ToolsInformation and data on running processes are available with two tools and their options.
Per-process information is available through a set of tools collectively known as the ptools, or process tools. These utilities are built on the process file system, procfs, located under /proc.
Process control is available with various ptools.
1.1.3. Forensic ToolsPowerful process- and thread-level tracing and debugging facilities included in Solaris 10 and OpenSolaris provide another level of visibility into process- or thread-execution flow and behavior.
Several tools enable you to trace, observe, and analyze the kernel and its interaction with applications.
Last, specific utilities track hardware-specific counters and provide visibility into low-level processor and system utilization and behavior.
|