1MMV(4) Kernel Interfaces Manual MMV(4)
2
3
4
6 mmv - Memory Mapped Values for Performance Co-Pilot
7
9 $PCP_TMP_DIR/mmv/<file>
10
12 The files in $PCP_TMP_DIR/mmv are generated by mmv_stats_init() func‐
13 tion from libpcp_mmv library. There could be multiple files in this
14 directory, each file representing a single source of the performance
15 metrics. The metrics are harvested by the mmv PMDA which exports them
16 to the rest of the Performance Co-Pilot infrastructure.
17
19 Each file starts with the following header:
20
21 ┌───────┬────────┬──────────────────────────┐
22 │Offset │ Length │ Name │
23 ├───────┼────────┼──────────────────────────┤
24 │ 0 │ 4 │ tag == "MMV\0" │
25 ├───────┼────────┼──────────────────────────┤
26 │ 4 │ 4 │ Version │
27 ├───────┼────────┼──────────────────────────┤
28 │ 8 │ 8 │ Generation 1 │
29 ├───────┼────────┼──────────────────────────┤
30 │ 16 │ 8 │ Generation 2 │
31 ├───────┼────────┼──────────────────────────┤
32 │ 24 │ 4 │ Number of TOC entries │
33 ├───────┼────────┼──────────────────────────┤
34 │ 28 │ 4 │ Flags │
35 ├───────┼────────┼──────────────────────────┤
36 │ 32 │ 4 │ Process identifier (PID) │
37 ├───────┼────────┼──────────────────────────┤
38 │ 36 │ 4 │ Cluster identifier │
39 └───────┴────────┴──────────────────────────┘
40 The generation numbers are timestamps at the time of file creation, and
41 must match for the file to be considered by the MMV PMDA.
42
43 The flags can specify ways in which the client would like the MMV PMDA
44 to behave - e.g. the MMV_FLAG_PROCESS flag specifies that only if the
45 process identified by PID is currently running should those values be
46 exported.
47
48 Finally, if set, the cluster identifier is a hint to the MMV PMDA as to
49 what cluster should be used with this application when forming the
50 individual metric identifiers. A performance metric identifier (see
51 PMDA(3)) consists of the PMDA domain number, the cluster number, and
52 the individual item numbers described in the Metrics section.
53
54 The header is followed by at least 2 TOC sections: one section for met‐
55 rics and another for values. The TOC section has the following format:
56
57 ┌───────┬────────┬─────────────────────────────────────────────┐
58 │Offset │ Length │ Value │
59 ├───────┼────────┼─────────────────────────────────────────────┤
60 │ 0 │ 4 │ Section Type (see mmv_stats.h) │
61 ├───────┼────────┼─────────────────────────────────────────────┤
62 │ 4 │ 4 │ Number of entries in the section │
63 ├───────┼────────┼─────────────────────────────────────────────┤
64 │ 8 │ 8 │ Section's offset from the start of the file │
65 └───────┴────────┴─────────────────────────────────────────────┘
66 The section types are:
67
68 1: Indoms (instance domain definitions)
69
70 2: Instances
71
72 3: Metrics (metric definitions)
73
74 4: Values
75
76 5: String
77
78 The only mandatory sections are Metrics and Values. Indoms and
79 Instances sections only appear if there are metrics with multiple
80 instances. String sections only appear if there are metrics with
81 string values, or when Metrics or Indoms are defined with help text.
82
83 The entries in the Indoms section have the following format:
84
85 ┌───────┬────────┬──────────────────────────────────────┐
86 │Offset │ Length │ Value │
87 ├───────┼────────┼──────────────────────────────────────┤
88 │ 0 │ 4 │ Unique serial number for this domain │
89 ├───────┼────────┼──────────────────────────────────────┤
90 │ 4 │ 4 │ Number of entries in the domain │
91 ├───────┼────────┼──────────────────────────────────────┤
92 │ 8 │ 8 │ Offset to first instance │
93 ├───────┼────────┼──────────────────────────────────────┤
94 │ 16 │ 8 │ Short help text offset │
95 ├───────┼────────┼──────────────────────────────────────┤
96 │ 24 │ 8 │ Long help text offset │
97 └───────┴────────┴──────────────────────────────────────┘
98 The entries in the Instances section have the following format:
99
100 ┌───────┬────────┬───────────────────────────────┐
101 │Offset │ Length │ Value │
102 ├───────┼────────┼───────────────────────────────┤
103 │ 0 │ 8 │ Offset into the indom section │
104 ├───────┼────────┼───────────────────────────────┤
105 │ 8 │ 4 │ Unused padding (zero filled) │
106 ├───────┼────────┼───────────────────────────────┤
107 │ 12 │ 4 │ Internal instance identifier │
108 ├───────┼────────┼───────────────────────────────┤
109 │ 16 │ 64 │ External instance identifier │
110 └───────┴────────┴───────────────────────────────┘
111 The entries in the Metrics section have the following format:
112
113 ┌───────┬────────┬───────────────────────────────┐
114 │Offset │ Length │ Value │
115 ├───────┼────────┼───────────────────────────────┤
116 │ 0 │ 64 │ Metric Name │
117 ├───────┼────────┼───────────────────────────────┤
118 │ 64 │ 4 │ Metric Item (see PMDA(3)) │
119 ├───────┼────────┼───────────────────────────────┤
120 │ 68 │ 4 │ Metric Type (see mmv_stats.h) │
121 ├───────┼────────┼───────────────────────────────┤
122 │ 72 │ 4 │ Semantics (see PMAPI(3)) │
123 ├───────┼────────┼───────────────────────────────┤
124 │ 76 │ 4 │ Dimensions (see PMAPI(3)) │
125 ├───────┼────────┼───────────────────────────────┤
126 │ 80 │ 4 │ Instance Domain ID │
127 ├───────┼────────┼───────────────────────────────┤
128 │ 84 │ 4 │ Unused padding (zero filled) │
129 ├───────┼────────┼───────────────────────────────┤
130 │ 88 │ 8 │ Short help text offset │
131 ├───────┼────────┼───────────────────────────────┤
132 │ 96 │ 8 │ Long help text offset │
133 └───────┴────────┴───────────────────────────────┘
134 The entries in the Values section have the following format:
135
136 ┌───────┬────────┬────────────────────────────────────┐
137 │Offset │ Length │ Value │
138 ├───────┼────────┼────────────────────────────────────┤
139 │ 0 │ 8 │ pmAtomValue (see PMAPI(3)) │
140 ├───────┼────────┼────────────────────────────────────┤
141 │ 8 │ 8 │ Extra space for STRING and ELAPSED │
142 ├───────┼────────┼────────────────────────────────────┤
143 │ 16 │ 8 │ Offset into the Metrics section │
144 ├───────┼────────┼────────────────────────────────────┤
145 │ 24 │ 8 │ Offset into the Instances section │
146 └───────┴────────┴────────────────────────────────────┘
147 Each entry in the strings section is a 256 byte character array, con‐
148 taining a single NULL-terminated character string. So each string has
149 a maximum length of 256 bytes, which includes the terminating NULL.
150
152 PCPIntro(1), PMAPI(3), mmv_stats_init(3), pcp.conf(4) and pcp.env(4).
153
154
155
156Performance Co-Pilot MMV(4)