This guide describes how to program Performance Co-Pilot™ (PCP), a software package of advanced performance management applications for the Silicon Graphics® family of graphical workstations and servers. Performance Co-Pilot provides a systems-level suite of tools that cooperate to deliver distributed, integrated performance monitoring and performance management services spanning the hardware platform, the operating system, service layers, users' applications, and distributed application architectures.
This document describes the programming interfaces to Performance Co-Pilot. It is intended for performance analysts or system administrators who want to extend or customize performance monitoring tools available with PCP, and also for developers who need to integrate their applications into the PCP framework. This book is written for those who are competent with the C programming language, the UNIX operating system, and the target domain from which the desired performance metrics are to be extracted. Familiarity with the Performance Co-Pilot tool suite is assumed—refer to the companion volume Performance Co-Pilot User's and Administrator's Guide.
Here is an overview of the material in this book:
Chapter 1, “Programming Performance Co-Pilot,” contains a thumbnail sketch of how to program the various PCP components.
Chapter 2, “Writing a PMDA,” describes how to write Performance Metrics Domain Agents for the Performance Co-Pilot.
Chapter 3, “PMAPI—The Performance Metrics API,” describes the interface that allows you to design custom performance monitoring tools.
Appendix A, “Acronyms,”contains an explanation of terms and acronyms.
The companion book titled Performance Co-Pilot User's and Administrator's Guide describes many of the concepts required to understand PCP. The following reference pages provide useful information for PMDA development: PCPIntro(1), pmcd(1), PMAPI(3), PMDA(3), and pmdatrace(3).
Several examples of PMDA source are provided with PCP, including the trivial PMDA, the simple PMDA, and the example txmon PMDA. As their names suggest, they do not provide any useful metrics; rather, they serve as examples of how to implement a PMDA. Complete source code for these PMDAs is located in directories under /usr/pcp/pmdas, some of which are symbolic links to /var/pcp/pmdas. Source code for sample applications that use the PCP trace library (libpcp_trace) may be found in /var/pcp/demos/trace.
Several include files are relevant:
/usr/include/pcp/pmapi.h and /usr/include/pcp/pmda.h
/usr/include/pcp/impl.h (required only for complex or low-level PMDAs)
/usr/include/pcp/trace.h
The Web site http://www.sgi.com/Products/hardware/challenge/CoPilot is worth visiting for updates about the product. A PCP tutorial in HTML format is distributed with the PCP product and may be found in the pcp.man.tutorial subsystem.
The table below lists typographic conventions used in this guide.
Purpose | Example |
Function or subroutine names
| Unlike a DSO PMDA, a daemon PMDA has a main routine. |
Names of shell commands | The pmcd daemon requests and collects performance data. |
Titles of manuals | See the Performance Co-Pilot User's and Administrator's Guide. |
Filenames and pathnames | Demo programs are in /var/pcp/demos and /var/pcp/pmdas. |
What you type (variables in italic) | cc -g sourcefile .c -lpcp_pmda -lpcp -lgen |
Exact quotes of computer output | Error: unknown PMID |
Reference page (man page) name | See pmcd(1) |