|
NAME | SYNOPSIS | DESCRIPTION | FILE FORMAT | SEE ALSO | COLOPHON |
|
|
|
MMV(5) File Formats Manual MMV(5)
mmv - Memory Mapped Values for Performance Co-Pilot
$PCP_TMP_DIR/mmv/<file>
The files in $PCP_TMP_DIR/mmv are generated either by the
mmv_stats_init(3) and mmv_stats2_init(3) functions from the
libpcp_mmv library, or by a native language module such as Parfait
(Java), Speed (Golang) or Hornet (Rust).
There could be multiple files in this directory, each file
representing a single source of the performance metrics. The
metrics are harvested by pmdammv(1) which exports them to the rest
of the Performance Co-Pilot infrastructure.
Each file starts with the following header:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Name โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 4 โ tag == "MMV\0" โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 4 โ 4 โ Version (1 or 2) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 8 โ Generation 1 โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 8 โ Generation 2 โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 24 โ 4 โ Number of TOC entries โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 28 โ 4 โ Flags โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 32 โ 4 โ Process identifier (PID) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 36 โ 4 โ Cluster identifier โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The version number specifies which mapping layout format is in
use. There are two, both are very similar, as described below.
The sole purpose of the MMV version 2 format is to allow the use
of longer metric and instance names. If names longer than
MMV_NAMEMAX are not in use, it is best to use MMV version 1 format
as this allows older versions of PCP to also consume the data.
Support for v2 format was added in the pcp-3.11.4 release.
The generation numbers are timestamps at the time of file
creation, and must match for the file to be considered by the MMV
PMDA.
The flags can specify ways in which the client would like the MMV
PMDA to behave - e.g. the MMV_FLAG_PROCESS flag specifies that
only if the process identified by PID is currently running should
those values be exported.
Finally, if set, the cluster identifier is a hint to the MMV PMDA
as to what cluster should be used with this application when
forming the individual metric identifiers. A performance metric
identifier (see PMDA(3)) consists of the PMDA domain number, the
cluster number, and the individual item numbers described in the
Metrics section.
The header is followed by at least 2 TOC sections: one section for
metrics and another for values. The TOC section has the following
format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 4 โ Section Type (see mmv_stats.h) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 4 โ 4 โ Number of entries in the section โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 8 โ Section's offset from the start of the file โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The section types are:
1: Indoms (instance domain definitions)
2: Instances
3: Metrics (metric definitions)
4: Values
5: String
6: Labels
The only mandatory sections are Metrics and Values. Indoms and
Instances sections of either version only appear if there are
metrics with multiple instances. String sections only appear if
there are metrics with string values, when Metrics or Indoms are
defined with help text, or in v2 MMV format where metric names and
instance names are stored in string sections (providing
significantly more space than v1 MMV format for these names).
Label sections only appear if there are metrics annotated with
labels (name/value pairs). Labels are supported in v3 MMV format.
The entries in the Indoms sections have the following format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 4 โ Unique serial number for this domain โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 4 โ 4 โ Number of entries in the domain โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 8 โ Offset to first Instance or Instance2 โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 8 โ Short help text offset โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 24 โ 8 โ Long help text offset โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The entries in the Instances (v1) section have the following
format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 8 โ Offset into the indom section โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 4 โ Unused padding (zero filled) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 12 โ 4 โ Internal instance identifier โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 64 โ External instance identifier โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The entries in the Instances (v2) section have the following
format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 8 โ Offset into the indom section โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 4 โ Unused padding (zero filled) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 12 โ 4 โ Internal instance identifier โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 8 โ External instance identifier string offset โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The entries in the Metrics (v1) section have the following format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 64 โ Metric Name โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 64 โ 4 โ Metric Item (see PMDA(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 68 โ 4 โ Metric Type (see mmv_stats.h) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 72 โ 4 โ Semantics (see PMAPI(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 76 โ 4 โ Dimensions (see PMAPI(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 80 โ 4 โ Instance Domain ID โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 84 โ 4 โ Unused padding (zero filled) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 88 โ 8 โ Short help text offset โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 96 โ 8 โ Long help text offset โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The entries in the Metrics (v2) section have the following format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 8 โ Metric Name string offset โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 4 โ Metric Item (see PMDA(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 12 โ 4 โ Metric Type (see mmv_stats.h) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 4 โ Semantics (see PMAPI(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 20 โ 4 โ Dimensions (see PMAPI(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 24 โ 4 โ Instance Domain ID โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 28 โ 4 โ Unused padding (zero filled) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 32 โ 8 โ Short help text offset โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 40 โ 8 โ Long help text offset โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The entries in the Values section have the following format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 8 โ pmAtomValue (see PMAPI(3)) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 8 โ Extra space for STRING and ELAPSED โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 16 โ 8 โ Offset into the Metrics section โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 24 โ 8 โ Offset into the Instances section โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Each entry in the strings section is a 256 byte character array,
containing a single NULL-terminated character string. So each
string has a maximum length of 256 bytes, which includes the
terminating NULL.
The entries in the Labels (v3) section have the following format:
โโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ Offset โ Length โ Value โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโค
โ 0 โ 4 โ Flags - PM_LABEL_ โ
โ โ โ CLUSTER, ITEM, โ
โ โ โ INDOM, INSTANCES โ
โ โ โ and OPTIONAL โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโค
โ 4 โ 4 โ Identifier for โ
โ โ โ given type (indom, โ
โ โ โ cluster or item) โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโค
โ 8 โ 4 โ Internal Instance โ
โ โ โ or PM_IN_NULL โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโค
โ 12 โ 244 โ Payload (Name and โ
โ โ โ Value JSONB โ
โ โ โ String) โ
โโโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโ
Each entry in the payload is a 244 byte (maximum) character array,
containing a single NULL-terminated name:value pair in JSON
format. Insignificant whitespace must not be present. Label
names consist only of alphanumeric characters or underscores, and
must begin with an alphabetic. Upper and lower case characters
are considered distinct.
PCPIntro(1), pmdammv(1), PMAPI(3), PMDA(3), mmv_stats_registry(3),
pcp.conf(5) and pcp.env(5).
This page is part of the PCP (Performance Co-Pilot) project.
Information about the project can be found at
โจhttp://www.pcp.io/โฉ. If you have a bug report for this manual
page, send it to pcp@groups.io. This page was obtained from the
project's upstream Git repository
โจhttps://github.com/performancecopilot/pcp.gitโฉ on 2026-05-24.
(At that time, the date of the most recent commit that was found
in the repository was 2026-05-24.) If you discover any rendering
problems in this HTML version of the page, or you believe there is
a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
man-pages@man7.org
Performance Co-Pilot MMV(5)
Pages that refer to this page: pmdammv(1), mmv_inc_value(3), mmv_lookup_value_desc(3), mmv_set_value(3), mmv_stats_init(3), mmv_stats_registry(3)