PMSORTINSTANCES(3)
πΈ PMSORTINSTANCES(3) πΈ
ok so bestie, welcome to the Library Functions Manual page for pmSortInstances and pmSortHighResInstances β yes those names are a mouthful, iykyk, but they're literally so useful. sit with me, this one's short and sweet π
β¨ NAME β¨
pmSortInstances, pmSortHighResInstances β sort performance metric values on instance identifier π
π¦ C SYNOPSIS π¦
first thing you do, you pull in the header:
#include <pcp/pmapi.h>
then here are the two functions, no cap:
void pmSortInstances(pmResult *result);
int pmSortHighResInstances(pmHighResResult *result);
and when you build, you link against libpcp like this:
cc ... -lpcp
π DESCRIPTION π
okay so here's the vibe. 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. periodt. π₯
and like, why do you even care? because this is so useful when you're computing rates from two consecutive samples β you need the instances lined up in the same order on both sides or the math goes feral π. pmSortInstances gets them in order so you're not out here matching instances by hand like a peasant.
note thatpmSortHighResInstanceshas a return type ofintwhilepmSortInstancesreturnsvoidβ the page doesn't spill any tea on what thatintmeans, so don't @ me π
π SEE ALSO π
go read these next, fr fr:
and that's the whole page, bestie, you ate it π β¨
sign-off moment: this cutie pie comes to you from the Performance Co-Pilot girlies over at PCP, and it's page PMSORTINSTANCES(3) β the original doesn't stamp a date on it, so it's giving timeless icon energy ππ¦π
π¦ where this page comes from
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: libpcp3-dev 6.3.8-1
- opensuse-leap 16.0: pcp-doc 6.2.0-160000.4.1 Β· GPL-2.0+ AND CC-BY-SA-3.0
- ubuntu noble: libpcp3-dev 6.2.0-1.1build4
- ubuntu questing: libpcp3-dev 6.3.8-1
- Copyright (c) 2022 Red Hat. All Rights Reserved
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms