1PMLOGCONF(1)                General Commands Manual               PMLOGCONF(1)
2
3
4

NAME

6       pmlogconf - create/edit a pmlogger configuration file
7

SYNOPSIS

9       $PCP_BINADM_DIR/pmlogconf  [-qrv]  [-d groupsdir] [-h hostname] config‐
10       file
11

DESCRIPTION

13       pmlogconf may be used to create and modify a generic configuration file
14       for the PCP archive logger, pmlogger(1).
15
16       If  configfile does not exist, pmlogconf will create a generic configu‐
17       ration file with a default set of enabled metrics  and  logging  inter‐
18       vals.
19
20       Once  created, configfile may be used with the -c option to pmlogger(1)
21       to select performance metrics and specify logging intervals for  a  PCP
22       archive.
23
24       If configfile does exist, pmlogconf will prompt for input from the user
25       to enable or disable groups of related performance metrics and to  con‐
26       trol the logging interval for each enabled group.
27
28       Group  selection  requires  a  simple y (yes) or n (no) response to the
29       prompt Log this group?.
30
31       Other responses at this point may be used to select additional  control
32       functions as follows:
33
34       m         Report the names of the metrics in the current group.
35
36       q         Finish  with  group  selection  (quit)  and  make  no further
37                 changes to this group or any subsequent group.
38
39       /pattern  Make no change to this group but search for a group  contain‐
40                 ing  pattern  in the description of the group or the names of
41                 the associated metrics.
42
43       A logging interval is specified by responding to the Logging  interval?
44       prompt  with the keywords once or default or a valid pmlogger(1) inter‐
45       val specification of the form ``every N timeunits'' or simply ``N time‐
46       units  ''  (the  every  is optional) where N is an unsigned integer and
47       timeunits is one of the keywords msec, millisecond, sec,  second,  min,
48       minute, hour or the plural form of one of the keywords.
49
50       The  -q option suppresses the logging interval dialog and preserves the
51       current interval from configfile.
52
53       More verbose output may be enabled with the -v option.
54

SETUP GROUP FILES

56       When an initial configfile is created, the default specifications  come
57       from  a  set  of  group files below the groupsdir specified with the -d
58       option (the default groupsdir is $PCP_VAR_DIR/config/pmlogconf which is
59       most commonly correct, so the -d option is rarely used in practice).
60
61       The  directory  structure  below  groupsdir is arbitrary as all regular
62       files will be found by recursive  descent  and  considered,  so  add-on
63       products  and  PMDA developers can easily extend the available defaults
64       to pmlogconf by adding new directories and/or group files below groups‐
65       dir.
66
67       These group files are processed in the following ways:
68
69       ·  When a new configfile is created, all group files are processed.
70
71       ·  Whenever  pmlogconf is run with an existing configfile, groupsdir is
72          traversed to see if any new groups have been defined and  should  be
73          considered for inclusion in configfile.
74
75       ·  When  pmlogconf processes a group in configfile that is enabled, the
76          list of metrics associated with the group is taken  from  the  group
77          file (and replaces any previous list of metrics associated with this
78          group in configfile).
79
80       ·  When the -r (reprobe) command line option is specified, every  group
81          (not  just newly discovered ones) is reprocessed to see if it should
82          be considered for inclusion in configfile.
83
84       Each group file is structured as follows:
85
86       ·  The first line must contain #pmlogconf-setup 2.0
87
88       ·  Other lines beginning with # are treated as comments.
89
90       ·  Blank lines are ignored.
91
92       ·  One or more lines starting with the keyword ident are used  to  pro‐
93          vide the human-readable description of the group.
94
95       ·  Non-blank  lines  beginning  with  white  space define metrics to be
96          associated with this group, one per line.  Each metric specification
97          follows the rules for a pmlogger(1) configuration, namely either the
98          name of a non-leaf node in the PMNS (implying all  descendent  names
99          in the PMNS), or the name of a leaf node in the PMNS optionally fol‐
100          lowed by one or more instance names enclosed by ``['' and ``]''.
101
102       ·  A control line starting with one of the keywords probe or force must
103          be present.
104
105       ·  An  optional  logging  interval control line begins with the keyword
106          delta followed by one  of  the  pmlogger(1)  interval  specification
107          described above.
108
109       ·  probe control lines have the format:
110                         probe metric [condition [state_rule] ]
111          where metric is the name of a PCP metric (must be a leaf node in the
112          PMNS and no instance specification is allowed) and the optional con‐
113          dition is the keyword exists (true if metric exists, i.e. is defined
114          in the PMNS) or the keyword values (true if  metric  exists  in  the
115          PMNS  and  has  one  or more current values) or an expression of the
116          form
117                                         op val
118          where op is one of the awk(1) operators (==, !=, >,  >=,  <,  <=,  ~
119          (regular expression match) or !~ (negated regular expression match))
120          and val is a value (arbitrary sequence of  characters,  excluding  a
121          space) and the condition is true if there is some instance of metric
122          that makes the expression true.  If the condition  is  missing,  the
123          default  is  exists.   When an explicit condition is provided, there
124          may also be an optional state_rule of the form
125                               ? true_state : false_state
126          where true_state (applies if  condition  is  true)  and  false_state
127          (applies  if  condition  is  false) are both taken from the keywords
128          include (include and enable the group and the associated metrics  in
129          configfile),  available (include and disable the group in configfile
130          - user action of y as described above is needed to enable the  group
131          and  add  the  associated  metrics  into configfile) or exclude (the
132          group is not considered for inclusion in configfile).   The  default
133          state_rule is
134                                 ? available : exclude
135
136       ·  force  control lines begin with the keyword force followed by one of
137          the states defined above, so one of the actions include, exclude  or
138          available is applied unconditionally to the group.
139
140       Probing  is  only done when a new group is being added to configfile or
141       when the -r command line option is specified.  The  evaluation  of  the
142       probing  conditions is done by contacting pmcd(1) on hostname (defaults
143       to localhost).
144

EXAMPLE

146       The following group file demonstrates all of  the  supported  syntactic
147       elements.   #pmlogconf-setup 2.0 ident   Example group file ident   ...
148       more description delta   1 minute probe   sample.secret.foo.one  values
149       ? include : exclude
150               sample.secret.foo.one
151               sample.secret.foo.bar   # non-leaf in the PMNS
152               sample.colour [ red green ]
153

MIGRATION

155       The  current  version  of pmlogconf (2.0) supports a slightly different
156       format for configfile compared to earlier versions.  If an old  version
157       configfile  is  presented  to pmlogconf it will be converted to the new
158       format.
159

PCP ENVIRONMENT

161       Environment variables with the prefix PCP_ are used to parameterize the
162       file  and  directory names used by PCP.  On each installation, the file
163       /etc/pcp.conf contains the  local  values  for  these  variables.   The
164       $PCP_CONF  variable may be used to specify an alternative configuration
165       file, as described in pcp.conf(4).
166

SEE ALSO

168       pmcd(1), pmlogger(1), pcp.conf(4) and pcp.env(4).
169
170
171
172Performance Co-Pilot                  SGI                         PMLOGCONF(1)
Impressum