PMLOOKUPINDOMARCHIVE(3)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– PMLOOKUPINDOMARCHIVE(3) πŸ’–

okay bestie, so this one lives in the Library Functions Manual and it's literally the glow-up era of pmLookupInDomArchive β€” it's the archived-archive version, the ✨specialized✨ one. Let's get into it 🫢


🌸 NAME 🌸

pmLookupInDomArchive β€” translate an instance name into an instance identifier

no cap, that's the whole job. name in, id out. πŸ’…


πŸŽ€ C SYNOPSIS πŸŽ€

#include <pcp/pmapi.h>

int pmLookupInDomArchive(pmInDom indom, const char *name);

cc ... -lpcp

so you include <pcp/pmapi.h>, you call it with a pmInDom and a const char *name, and when you link you gotta bring -lpcp along for the ride or it will simply not build. that's just the vibe. πŸ¦‹


✨ DESCRIPTION ✨

okay so here's the tea β˜• β€” provided the current Performance Metrics Application Programming Interface (PMAPI) context is associated with a set of archives, pmLookupInDomArchive will scan the union of all the instance domain metadata for the instance domain indom, locate the first instance with the external identification given by name, and hand you back the internal instance identifier. iconic behaviour honestly. πŸ‘‘

This routine is a specialized version of the more general PMAPI routine pmLookupInDom. it's giving "same energy, but archives only" πŸ’œ

Only the leading non-space characters of name will be used to identify the instance. so like, trim your whitespace mentally, she's not gonna do it for you πŸ™ˆ

The value for the instance domain indom is typically extracted from a pmDesc structure, following a call to pmLookupDesc(3) for a particular performance metric. that's the pipeline, bestie β€” desc first, then this. 🌈

pmLookupInDomArchive will return a positive instance identifier on success. positive vibes only, literally ✨


πŸ’€ DIAGNOSTICS πŸ’€

these are the "it didn't work" era moments, and you need to know them fr fr:

  • PM_ERR_NOTARCHIVE β€” the current PMAPI context is not associated with a set of archives. wrong context, wrong energy, not it. 😭
  • PM_ERR_INDOM_LOG β€” indom is not a defined instance domain identifier for the set of archives. that domain? unknown to her. πŸ’€
  • PM_ERR_INST_LOG β€” the external instance name is not known for the instance domain indom in the set of archives. the name you're looking for is not in the group chat 🚫
bestie please actually check these. guessing at error codes is not the main character move. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

go read these too, they're all part of the same friend group, iykyk πŸ’–


and that's the whole page, bestie!! πŸŽ€ this slay of a manual page came to you from Performance Co-Pilot (PCP), and it's filed under PMLOOKUPINDOMARCHIVE(3). obsessed. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from