This section describes some of the Solaris-specific tools and utilities you can use to monitor your system's behavior, and includes the following topics:
The tools described in this section monitor performance from the standpoint of how the system responds to the load Sun Java System Web Server generates. For information about using Sun Java System Web Server's own capabilities to track the demands users place on the Web Server itself, seeMonitoring Server Performance
Solaris offers several tools for taking "snapshots" of system behavior. Although you can capture their output in files for later analysis, the tools listed below are primarily intended for monitoring system behavior in real time:
Watch the %b column to see how much of the time each disk is busy, and for any disk busy more than about 20% of the time pay attention to the service time as reported in the svct column. Other columns report the I/O operation rates, the amount of data transferred, and so on.
Monitor the sr column to keep track of the page scan rate and take action if it's too high (note that "too high" is very different for Solaris 8 and 9 than for earlier releases). Watch the us, sy, and id columns to see how heavily the CPUs are being used; remember that you need to keep plenty of CPU power in reserve to handle sudden bursts of activity. Also keep track of the r column to see how many threads are contending for CPU time; if this remains higher than about four times the number of CPUs, you may need to reduce the server's concurrency.
It is important not only to "spot-check" system performance with the tools mentioned above, but to collect longer-term performance histories so you can detect trends. If nothing else, a baseline record of a system performing well may help you figure out what has changed if the system starts behaving poorly. We recommend you enable the system activity reporting package by doing the following:
Edit the file /etc/init.d/perf and remove the # comment characters from the lines near the end of the file.
Run the command crontab -e sys and remove the # comment characters from the lines with the sa1 and sa2 commands. You may also wish to adjust how often the commands run and at what times of day depending on your site's activity profile (see man crontab for an explanation of the format of this file).
This causes the system to store performance data in files in the /var/adm/sa directory, where by default they are retained for one month. You can then use the sar command to examine the statistics for time periods of interest.
The "SE toolkit" is a freely downloadable software package developed by Sun performance experts. In addition to collecting and monitoring raw performance statistics, the toolkit can apply heuristics to characterize the overall health of the system and highlight areas that may need adjustment. You can download the toolkit and its documentation from the following location: