4 .\" Copyright (c) 2009 Max Matveev
5 .\" Copyright (c) 2009 Aconex. All Rights Reserved.
7 .\" This program is free software; you can redistribute it and/or modify it
8 .\" under the terms of the GNU General Public License as published by the
9 .\" Free Software Foundation; either version 2 of the License, or (at your
10 .\" option) any later version.
12 .\" This program is distributed in the hope that it will be useful, but
13 .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 .TH MMV 5 "" "Performance Co-Pilot"
20 \f3mmv\f1 \- Memory Mapped Values for Performance Co-Pilot
22 .I $PCP_TMP_DIR/mmv/<file>
24 The files in \f2$PCP_TMP_DIR/mmv\f1 are generated by
25 \f2mmv_stats_init\f1() function from \f3libpcp_mmv\f1 library. There could
26 be multiple files in this directory, each file representing a single source
27 of the performance metrics. The metrics are harvested by the \f2mmv\f1 PMDA
28 which exports them to the rest of the Performance Co-Pilot infrastructure.
30 Each file starts with the following header:
45 24 4 Number of TOC entries
49 32 4 Process identifier (PID)
51 36 4 Cluster identifier
55 The generation numbers are timestamps at the time of file
56 creation, and must match for the file to be considered by
59 The flags can specify ways in which the client would like
60 the MMV PMDA to behave - e.g. the MMV_FLAG_PROCESS flag
61 specifies that only if the process identified by PID is
62 currently running should those values be exported.
64 Finally, if set, the cluster identifier is a hint to the MMV
65 PMDA as to what cluster should be used with this application
66 when forming the individual metric identifiers.
67 A performance metric identifier (see \f2PMDA\f1(3)) consists of
68 the PMDA domain number, the cluster number, and the individual
69 item numbers described in the Metrics section.
71 The header is followed by at least 2 TOC sections:
72 one section for metrics and another for values.
73 The TOC section has the following format:
80 0 4 Section Type (see \f2mmv_stats.h\f1)
82 4 4 Number of entries in the section
84 8 8 Section's offset from the start of the file
88 The section types are:
91 Indoms (instance domain definitions)
97 Metrics (metric definitions)
105 The only mandatory sections are Metrics and Values.
106 Indoms and Instances sections only appear if there are metrics with
108 String sections only appear if there are metrics with string values,
109 or when Metrics or Indoms are defined with help text.
111 The entries in the Indoms section have the following format:
118 0 4 Unique serial number for this domain
120 4 4 Number of entries in the domain
122 8 8 Offset to first instance
124 16 8 Short help text offset
126 24 8 Long help text offset
130 The entries in the Instances section have the following format:
137 0 8 Offset into the indom section
139 8 4 Unused padding (zero filled)
141 12 4 Internal instance identifier
143 16 64 External instance identifier
147 The entries in the Metrics section have the following format:
156 64 4 Metric Item (see \f2PMDA\f1(3))
158 68 4 Metric Type (see \f2mmv_stats.h\f1)
160 72 4 Semantics (see \f2PMAPI\f1(3))
162 76 4 Dimensions (see \f2PMAPI\f1(3))
164 80 4 Instance Domain ID
166 84 4 Unused padding (zero filled)
168 88 8 Short help text offset
170 96 8 Long help text offset
174 The entries in the Values section have the following format:
181 0 8 \f3pmAtomValue\f1 (see \f2PMAPI\f1(3))
183 8 8 Extra space for STRING and ELAPSED
185 16 8 Offset into the Metrics section
187 24 8 Offset into the Instances section
191 Each entry in the strings section is a 256 byte character array,
192 containing a single NULL-terminated character string.
193 So each string has a maximum length of 256 bytes, which includes
194 the terminating NULL.
199 .BR mmv_stats_init (3),