PMSORTINSTANCES(3) Library Functions Manual PMSORTINSTANCES(3)

pmSortInstances, pmSortHighResInstances - sort performance metric values on instance identifier

#include <pcp/pmapi.h>

void pmSortInstances(pmResult *result);
int pmSortHighResInstances(pmHighResResult *result);

cc ... -lpcp

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

This is useful when computing rates from two consecutive samples.

PMAPI(3), pmFetch(3) and pmFetchHighRes(3).

PCP Performance Co-Pilot