MMV_LOOKUP_VALUE_DESC(3)
β¨ NAME β¨
mmv_lookup_value_desc β bestie, this is the one that goes and finds a value in the Memory Mapped Value file π
π C SYNOPSIS π
#include <pcp/pmapi.h>
#include <pcp/mmv_stats.h>
pmAtomValue *mmv_lookup_value_desc(void *addr, const char *metric,
const char *inst);
cc ... -lpcp_mmv -lpcp
okay so literally just those two includes and you're in π«Ά
π¦ DESCRIPTION π¦
so mmv_lookup_value_desc is out here searching for the value of the instance identified by the external instance name inst of the metric metric, inside the MMV(5) file. no cap, that's the whole mission π
and addr? that's the address you got back from mmv_stats_init(). don't lose it bestie, you need it here π
The pointer it hands back points to a pmAtomValue union, and that union is defined like this, exactly like this:
typedef union {
__int32_t l; /* 32-bit signed */
__uint32_t ul; /* 32-bit unsigned */
__int64_t ll; /* 64-bit signed */
__uint64_t ull; /* 64-bit unsigned */
float f; /* 32-bit floating point */
double d; /* 64-bit floating point */
char *cp; /* char ptr */
pmValueBlock *vbp; /* pmValueBlock ptr */
} pmAtomValue;
πΈ little side quest note: MMV string values should be set using either of the mmv_set_string or mmv_set_strlen routines. pick one, you're iconic either way π
β RETURNS β
On success? It returns the address inside of the memory mapped region. slay.
On failure? It returns NULL. absolutely devastating, check your inputs fr fr π
π SEE ALSO π
not me ending every page with the same energy but okay π
this was brought to you by Performance Co-Pilot, page MMV_LOOKUP_VALUE_DESC(3), and yeah it's giving main character energy, periodt π
β¨π
π¦ 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
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- 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.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- 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
- ubuntu resolute: libpcp-mmv1-dev 7.1.1-1
- ubuntu stonking: libpcp-mmv1-dev 7.2.1-2build1
- Copyright (c) 2009 Max Matveev
- Copyright (c) 2009 Aconex. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms