Performance monitoring and management in complex systems demands the ability to accurately capture performance characteristics for subsequent review, analysis, and comparison. Performance Co-Pilot (PCP) provides extensive support for the creation and management of archive logs that capture a user-specified profile of performance information to support retrospective performance analysis.
The following major sections are included in this chapter:
“Introduction to Archive Logging”, presents the concepts and issues involved with creating and using archive logs.
“Using Archive Logs with Performance Visualization Tools”, describes the interaction of the PCP tools with archive logs.
This chapter only provides descriptions about tools and services which are not provided in the foundation components of PCP. For an introduction to pmlogger and its features and details about other pmlogger tools, see Chapter 6, “Archive Logging”, in the Performance Co-Pilot for IRIX User's and Administrator's Guide.
Within the PCP, the pmlogger utility may be configured to collect archives of performance metrics. PCP adds the following features to those already provided by the standard PCP components in IRIX:
The IRIX operating system supports the standard cron process scheduling system. Complete information on the cron command is available in the appropriate man page and in IRIX Admin: System Configuration and Operation.
PCP supplies shell scripts to use the cron functionality to help manage your archive logs. The following scripts are supplied:
Script | Description | |
pmlogger_daily | Performs a daily housecleaning of archive logs and notices. | |
pmlogger_merge | Merges archive logs and is called by pmlogger_daily. | |
pmlogger_check | Checks to see that all desired pmlogger processes are running on your system, and invokes any that are missing for any reason. | |
pmsnap | Generates graphic image snapshots of pmchart performance charts at regular intervals. |
The configuration files used by these scripts can be edited to suit your particular needs, and are generally controlled by the /var/pcp/config/pmlogger/control file (pmsnap has an additional control file). Complete information on these scripts is available in the pmlogger_daily(1) and pmsnap(1) man pages.
Periodic snapshot images of recent performance, activity levels, and resource utilization can be extracted from the PCP archive logs and published via a World Wide Web (WWW) server. These are high-quality images generated from pmchart that provide an excellent vehicle for publishing performance summary information for users, system and network administrators, or managers. The pmsnap services may be used to automate snapshots. For additional information, see the pmsnap(1) man page.
You may also choose to enable periodic snapshot images of performance data to be produced from the archive logs using the facilities of pmsnap; instructions for this operation can be found in “Taking Snapshots of pmchart Displays and Value Dialogs” in Chapter 4, and in the pmsnap(1) man page.
Assume the local host has been set up to create archive logs of performance metrics collected from the host oscar (which may be either the local host or a remote host). Execute all of the following tasks while logged into the local host as the superuser (root ).
Make sure the optional subsystem pcp.sw.monitor has been installed.
Use the /var/pcp/config/pmsnap/Summary snapshot as an example (you may wish to customize this later).
Ensure that the pmlogger that is collecting performance metrics from the host oscar includes all of the metrics named in the /var/pcp/config/pmlogger/config.Summary configuration file (you may wish to simply use this as the configuration file for this pmlogger instance). If necessary, reconfigure this pmlogger instance as follows:
kill -INT PID-of-pmlogger-instance |
Edit the configuration file as required. Restart pmlogger with this command:
/usr/pcp/bin/pmlogger_check |
Check the two Summary lines in the /var/pcp/config/pmsnap/control file. You must replace LOCALHOSTNAME with oscar in both lines (unless oscar is the local host, in which case the change is optional), and you may wish to change the directory for the output files (the default is /var/www/htdocs/snapshots).
Augment the crontab file for root to allow pmsnap to be run periodically. For example:
crontab -l >/tmp/foo |
Edit /tmp/foo, adding lines similar to those from /var/pcp/config/pmlogger/crontab for pmsnap; for example:
# every 30 minutes, generate performance snapshot images 30,0 * * * * /usr/pcp/bin/pmsnap -d :0 |
The snapshots are produced using pmchart, and this tool requires connection to an X server. If the local host is not running an X server, then you must locate a system with an active X server, and ensure that this X server will accept connections from remote X clients; see the xhost(1) man page for details. If this host is grover, then replace -d :0 in the line above with -d grover:0
Other options for gaining access to an active X server are discussed in the pmsnap(1) man page.
Make these changes permanent with this command:
crontab </tmp/foo |
After 30 minutes or so (time enough for the cron command to complete), check that the GIF files have been created:
ls -l /var/www/htdocs/snapshots |
Create a Web page that includes the images. A sample file of HTML source is provided in /var/pcp/config/pmsnap/Summary.html .