PMSEARCHTEXTINDOM(3)

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

πŸ’– PMSEARCHTEXTINDOM(3) πŸ’–

okay so bestie, this one lives in the Library Functions Manual section 3, and it's called pmSearchTextInDom β€” yes the name is a mouthful, we love her anyway 🫢


✨ NAME ✨

pmSearchTextInDom β€” search for all entities related to given instance domain πŸ”πŸ‘‘


🌸 C SYNOPSIS 🌸

#include <pcp/pmwebapi.h>

int pmSearchTextInDom(pmSearchSettings *settings,
                      pmSearchTextRequest *request, void *arg);

cc ... -lpcp_web

like, that's the whole vibe. link against -lpcp_web and you're set πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So what does she actually DO? She runs a search for all the metrics, instances and instance domains that are related to a given instance domain β€” the one you specify in request. That's it. That's the whole main character moment ✨

Here's what you're feeding her through request:

  • query β€” the target instance domain. literally the thing you're searching around 🎯
  • count β€” caps how many results you get back. defaults to 10, so don't come crying if you only see ten, okay? 😭
  • offset β€” the search offset. defaults to 0, so you start at the very beginning (a very good place to start) 🌈
ngl the results come back ordered by type, in ascending order. no cap. πŸ“ˆ

Every single entity that matches your request gets handed off to the on_text_result callback that you provided via settings. so like… make sure that callback exists, bestie πŸ™ˆ


πŸ’€ DIAGNOSTICS πŸ’€

This function always returns zero on success. periodt. ✨

On failure? You get a negative PMAPI error code back. so if the number is negative, something's giving "not slay" and you should probably look into it πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're iconic:


mwah πŸ’‹ this page came to you from Performance Co-Pilot (that's PCP, iykyk) β€” stay hydrated, read your man pages, and remember: ascending order by type, always πŸŽ€

πŸ“¦ where this page comes from