File: genpmda.1

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (141 lines) | stat: -rw-r--r-- 4,338 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
'\"macro stdmacro
.\"
.\" Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.\"
.TH GENPMDA 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3genpmda\f1 \- Performance Co-Pilot PMDA Generator
.SH SYNOPSIS
\f3genpmda\f1
[\f3\-dv\f1]
[\f3\-D\f1 \f2domain\f1]
[\f3\-n\f1 \f2pmns\f1]
[\f3\-o\f1 \f2dir\f1]
[\f3\-s\f1 \f2stdpmid\f1]
[\f3\-t\f1 \f2topdir\f1]
\f3\-c\f1 \f2config\f1
\f3\-i\f1 \f2IAM\f1
.SH DESCRIPTION
.B genpmda
is a rapid application development tool for creating new
Performance Metrics Domain Agents, see
.BR PMDA (3).
It provides a very easy and efficient way to extend
the Performance Co-pilot (PCP) with new performance metrics
without needing to understand the low level details of how PMDAs are
constructed.
.PP
.B genpmda
reads a config file containing an augmented
Performance Metrics Name Space, see
.BR PMNS (5),
and automatically generates virtually all of the source code
to implement a fully functional PMDA, including the Makefile,
name space, support scripts for configuring the new PMDA,
and the metrics help text.
Fairly simple PMDAs can be automatically generated from the
config file without writing any additional code.
More complicated PMDAs, e.g. containing multiple instance domains,
require only the refresh methods for the instance domains to be
written manually.
.PP
An example of the config file format accepted by
.B genpmda
is given below.
.SH OPTIONS
.TP 0
.B "Required options:"
.TP 5
.BI "\-c" " config"
input \f2config\f1 file, see example below
.TP
.BI "\-i" " IAM"
PMDA name \f2IAM\f1, should appear in \f2stdpmid\f1 or the \f3\-D\f1 option must be used to specify a \f2domain\f1.
.TP 0
.B "Other options:"
.TP 5
.BI "\-d"
generate an Install script for a daemon PMDA (default is DSO)
.TP
.BI "\-D" " domain"
use \f2domain\f1 number in the generated \f3pmns\f1 and \f3domain.h\f1 (if \f3\-s\f1 is not given)
.TP
.BI "\-n" " pmns"
use \f2pmns\f1 as root of the namespace (default matches \f3\-i\f1 flag)
.TP
.BI "\-o" " dir"
use \f2dir\f1 for generated source code, default \f3./generated\f1
.TP
.BI "\-s" " stdpmid"
path to \f2stdpmid\f1 (default \f3../../pmns/stdpmid\f1)
.TP
.BI "\-t" " topdir"
use \f2topdir\f1 in generated GNUmakefile, default \f3../../..\f1
.TP
.BI "\-v"
print verbose messages about what
.B genpmda
is doing.
.PP
Example:
    Generate an "example" PMDA using domain 99:
.P
    \f3genpmda \-D 99 \-v \-i EXAMPLE \-c example.conf\f1

Here is \f2example.conf\f1 config file (for the required \f3\-c\f1 option):
.br
.in +0.5i
.sp
.nf
example {
    metric
}

example.metric {
    ##  metric            string
    ##  pmid              EXAMPLE:CLUSTER:0
    ##  indom             PM_INDOM_NULL
    ##  type              PM_TYPE_STRING
    ##  units             PMDA_PMUNITS(0,0,0,0,0,0)
    ##  semantics         PM_SEM_DISCRETE
    ##  briefhelptext     one line help text for example.metric.string
    ##  helptext          long help text for example.metric.string
    ##  helptext          This is the second line of the long help text
    ##  helptext          and this is the third line.
    ##  fetch             function example_string_fetch_callback
    ##  code              atom->cp = "hello world";
    ##  code              return 1;
    ##  endmetric
}

.fi
.sp 2
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fP are used to parameterize
the file and directory names used by PCP.
On each installation, the
file \fI/etc/pcp.conf\fP contains the local values for these variables.
The \fB$PCP_CONF\fP variable may be used to specify an alternative
configuration file, as described in \fBpcp.conf\fP(5).
.SH SEE ALSO
.BR pmcd (1),
.BR PMDA (3),
.BR pcp.conf (5),
.BR pcp.env (5)
and
.BR PMNS (5).

.\" control lines for scripts/man-spell
.\" +ok+ briefhelptext endmetric
.\" +ok+ example_string_fetch_callback helptext