Chapter 7. Archive Logging

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:

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.

Introduction to Archive Logging

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:

  • Record mode in various GUI monitoring tools to create archives as needed from the current visualization.

  • cron-based scripts to expedite the operational management, for example, log rotation, consolidation, and culling.

Using Archive Logs with Performance Visualization Tools

Administering PCP Archive Logs Using cron Scripts

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:




Performs a daily housecleaning of archive logs and notices.


Merges archive logs and is called by pmlogger_daily.


Checks to see that all desired pmlogger processes are running on your system, and invokes any that are missing for any reason.


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.

Snapshots from PCP Archive Logs

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.

Making Snapshot Images from Archive Logs

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 ).

  1. Make sure the optional subsystem pcp.sw.monitor has been installed.

  2. Use the /var/pcp/config/pmsnap/Summary snapshot as an example (you may wish to customize this later).

  3. 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:


  4. 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).

  5. Augment the crontab file for root to allow pmsnap to be run periodically. For example:

    crontab -l >/tmp/foo

  6. 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.

  7. Make these changes permanent with this command:

    crontab </tmp/foo

  8. 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

  9. Create a Web page that includes the images. A sample file of HTML source is provided in /var/pcp/config/pmsnap/Summary.html .