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
pmCtime(3)
Formats the date and time for a reporting timezone.
pmLocaltime(3)
Converts the date and time for a reporting timezone.
pmParseTimeWindow(3)
Parses time window command line arguments.
pmTimeConnect(3)
Connects to a time control server via a command socket.
pmTimeDisconnect(3)
Closes the command socket to the time control server.
pmTimeGetPort(3)
Obtains the port name of the current time control server.
pmTimeRecv(3)
Blocks until the time control server sends a command message.
pmTimeSendAck(3)
Acknowledges completion of the step command.
pmTimeSendBounds(3)
Specifies beginning and end of archive time period.
pmTimeSendMode(3)
Requests time control server to change to a new VCR mode.
pmTimeSendPosition(3)
Requests time control server to change position or update intervals.
pmTimeSendTimezone(3)
Requests time control server to change timezones.
pmTimeShowDialog(3)
Changes the visibility of the time control dialogue.
pmTimeGetStatePixmap(3)
Returns array of pixmaps representing supplied time control state.