■
The mpstat 60 command gives a detailed look at CPU statistics, while the netstat -i 60
command summarizes network activity.
Long-Term System Monitoring
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 might help you gure out what has changed if the
system starts behaving poorly. Enable the system activity reporting package by doing the
following:
■
Edit the le /etc/init.d/perf and remove the # comment characters from the lines near
the end of the le. For Solaris 10, run the following command:
svcadm enable system/sar
■
Run the command crontab -e sys and remove the # comment characters from the lines
with the sa1 and sa2 commands. You might also wish to adjust how often the commands
run and at what times of day depending on your site's activity prole (see the crontab man
page for an explanation of the format of this le).
This causes the system to store performance data in les 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.
“Intelligent”Monitoring
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 might
need adjustment. You can download the toolkit and its documentation from the following
location:
http://www.sunfreeware.com/setoolkit.html
Solaris 10 Platform-Specic Tuning Information
DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment.
You can use the DTrace Toolkit to monitor the system. It is available from the following URL:
http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/
Solaris10 Platform-SpecicTuningInformation
Chapter4 • Platform-SpecicIssuesandTips 95