PMSEARCHTEXTSUGGEST(3)
π pmSearchTextSuggest(3) π
okay bestie, so this one lives in the Library Functions Manual for PCP, and it's literally the girl who finds you metric and instance names when you start typing and you're like "wait what was it called" π«Ά
β¨ NAME β¨
pmSearchTextSuggest β search for suggestions of metric or instance names using PCP search services π
β¨ C SYNOPSIS β¨
#include <pcp/pmwebapi.h>
int pmSearchTextSuggest(pmSearchSettings *settings,
pmSearchTextRequest *request, void *arg);
cc ... -lpcp_web
β¨ DESCRIPTION β¨
So what this does is run a full-text search for names of metrics or instances β the kind of names you'd want for auto-completion, you know, when the little dropdown pops up and saves your whole life πΈ β and it's all specified by request:
queryβ the query string that's gonna be used to search. that's the vibe you're throwing at it πcountβ limits the number of results. defaults to10. so if you don't say anything, you get ten, no cap.
This search does prefix matching on entity names using FTS5 prefix indexes. Terms in query get a wildcard appended to them so partial names still match β like, ker matches kernel β¨ (yes, that's the actual example, iconic).
Every single entity that gets matched by the request above gets passed to the on_text_result callback that settings provides. so your callback is the main character here, fr fr π
β¨ DIAGNOSTICS β¨
This function always returns zero on success π On failure? It returns a negative PMAPI error code π not me getting a negative number back.
β¨ SEE ALSO β¨
pmproxy(1), pmlogger(1), pmsearch(1), pmSearchSetup(3), PMAPI(3) and PMWEBAPI(3) π¦
that's the whole page bestie, go forth and suggest some names π
Performance Co-Pilot β PCP β PMSEARCHTEXTSUGGEST(3) π
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- Copyright (c) 2020,2026 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms