mmv (5) - Linux Man Pages

mmv: Memory Mapped Values for Performance Co-Pilot

NAME

mmv - Memory Mapped Values for Performance Co-Pilot

SYNOPSIS

$PCP_TMP_DIR/mmv/<file>

DESCRIPTION

The files in $PCP_TMP_DIR/mmv are generated by mmv_stats_init() function from libpcp_mmv library. There could be multiple files in this directory, each file representing a single source of the performance metrics. The metrics are harvested by the mmv PMDA which exports them to the rest of the Performance Co-Pilot infrastructure.

FILE FORMAT

Each file starts with the following header:
OffsetLengthName

      tag == "MMV\0"

      Version

      Generation 1

16       Generation 2

24       Number of TOC entries

28       Flags

32       Process identifier (PID)

36       Cluster identifier

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:

OffsetLengthValue

      Section Type (see mmv_stats.h)

      Number of entries in the section

      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

The only mandatory sections are Metrics and Values. Indoms and Instances sections only appear if there are metrics with multiple instances. String sections only appear if there are metrics with string values, or when Metrics or Indoms are defined with help text.

The entries in the Indoms section have the following format:

OffsetLengthValue

      Unique serial number for this domain

      Number of entries in the domain

      Offset to first instance

16       Short help text offset

24       Long help text offset

The entries in the Instances section have the following format:

OffsetLengthValue

      Offset into the indom section

      Unused padding (zero filled)

12       Internal instance identifier

16    64    External instance identifier

The entries in the Metrics section have the following format:

OffsetLengthValue

   64    Metric Name

64       Metric Item (see PMDA(3))

68       Metric Type (see mmv_stats.h)

72       Semantics (see PMAPI(3))

76       Dimensions (see PMAPI(3))

80       Instance Domain ID

84       Unused padding (zero filled)

88       Short help text offset

96       Long help text offset

The entries in the Values section have the following format:

OffsetLengthValue

      pmAtomValue (see PMAPI(3))

      Extra space for STRING and ELAPSED

16       Offset into the Metrics section

24       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.

SEE ALSO

PCPIntro(1), PMAPI(3), mmv_stats_init(3), pcp.conf(5) and pcp.env(5).