pmSortInstances - Man Page

sort performance metric values on instance identifier

C Synopsis

#include <pcp/pmapi.h>

void pmSortInstances(pmResult *result);

cc ... -lpcp

Description

The routine pmSortInstances may be used to guarantee that for each performance metric in the result from pmFetch(3) the instances are in ascending instance identifier sequence.

This is useful when computing rates from two consecutive samples.

Compatibility

Prior to PCP 7.0 the timestamp field in the pmResult struct was a struct timeval. To support PMAPI transition, the old interface and semantics can be used if applications are recompiled with -DPMAPI_VERSION=2.

For a time in PCP 6.x there was a routine with the same semantics as the current pmSortInstances called pmSortHighResInstances, and a struct with the same definition as the current pmResult struct called pmResultHighRes, although both are now deprecated and compile-time support for pmSortHighResInstances and pmResultHighRes will be removed in a future release.

See Also

PMAPI(3) and pmFetch(3).

Info

PCP Performance Co-Pilot