Product SiteDocumentation Site

3.8.10. PMAPI Time Control Services

The PMAPI provides a common framework for client applications to control time and to synchronize time with other applications. The user interface component of this service is fully described in the companion Performance Co-Pilot User's and Administrator's Guide. See also the pmtime(1) man page.
This service is most useful when processing sets of PCP archive logs, to control parameters such as the current archive position, update interval, replay rate, and timezone, but it can also be used in live mode to control a subset of these parameters. Applications such as pmchart, pmgadgets, pmstat, and pmval use the time control services to connect to an instance of the time control server process, pmtime, which provides a uniform graphical user interface to the time control services.
A full description of the PMAPI time control functions along with code examples can be found in man pages as listed in Table 3.2, “Time Control Functions in PMAPI”:

Table 3.2. Time Control Functions in PMAPI

Man Page
Synopsis of Time Control Function
Formats the date and time for a reporting timezone.
Converts the date and time for a reporting timezone.
Parses time window command line arguments.
Connects to a time control server via a command socket.
Closes the command socket to the time control server.
Obtains the port name of the current time control server.
Blocks until the time control server sends a command message.
Acknowledges completion of the step command.
Specifies beginning and end of archive time period.
Requests time control server to change to a new VCR mode.
Requests time control server to change position or update intervals.
Requests time control server to change timezones.
Changes the visibility of the time control dialogue.
Returns array of pixmaps representing supplied time control state.