summaryrefslogtreecommitdiff
path: root/man/man1/pmieconf.1
blob: 0b65d0ab1e37c199311993a037e8d073a1bed517 (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
'\"macro stdmacro
.ie \(.g \{\
.\" ... groff (hack for khelpcenter, man2html, etc.)
.TH PMIECONF 1 "PCP" "Performance Co-Pilot"
\}
.el \{\
.if \nX=0 .ds x} PMIECONF 1 "PCP" "Performance Co-Pilot"
.if \nX=1 .ds x} PMIECONF 1 "Performance Co-Pilot"
.if \nX=2 .ds x} PMIECONF 1 "" "\&"
.if \nX=3 .ds x} PMIECONF "" "" "\&"
.TH \*(x}
.rr X
\}
.SH NAME
\f3pmieconf\f1 \- display and set configurable pmie rule variables
.SH SYNOPSIS
\f3pmieconf\f1
[\f3\-cFv\f1]
[\f3\-f\f1 \f2file\f1]
[\f3\-r\f1 \f2rulepath\f1]
[\f2command\f1 [\f2args...\f1]]
.SH DESCRIPTION
.B pmieconf
is a utility for viewing and configuring variables from generalized
.BR pmie (1)
rules.
The set of generalized rules is read in from
.IR rulepath ,
and the output
.I file
produced by
.B pmieconf
is a valid input file for
.BR pmie .
.PP
A brief description of the
.B pmieconf
command line options follows:
.TP 8
\f3-c\f1
When run from automated
.B pmie
setup processes, this option is used to add a specific message and
timestamp indicating that this is the case.
It is not appropriate when using the tool interactively.
.TP 8
\f3\-f\f1 \f2file\f1 
Any rule modifications resulting from
.B pmieconf
manipulation of variable values will be written to \f2file\f1.
The default value of \f2file\f1 is dependent on the user ID \- for the root
user, the file
.I $PCP_VAR_DIR/config/pmieconf/config.pmie
is used, for other users the default is
.IR $HOME/.pcp/pmie/config.pmie .
.TP 8
\f3\-F\f1
Forces the
.B pmieconf
output
.I file
to be created (or updated), after which
.B pmieconf
immediately exits.
.TP 8
\f3\-r\f1 \f2rulepath\f1
Allows the source of generalized
.B pmie
rules to be changed \- \f2rulepath\f1 is a colon-delimited list of
.BR pmieconf (5)
rule files and/or subdirectories.
The default value for
.I rulepath
is
.IR $PCP_VAR_DIR/config/pmieconf .
Use of this option overrides the
.B PMIECONF_PATH
environment variable which has a similar function.
.TP 8
\f3\-v\f1
Verbose mode.  Additional information associated with each rule and its
associated variables will be displayed.  This is the complete list of
variables which affects any given rule (by default, global variables are
not displayed with the rule).
.PP
The
.B pmieconf
.IR command s
allow information related to the various rules and configurable variables
to be displayed or modified.
If no
.B pmieconf
.IR command s
are presented on the command line,
.B pmieconf
prompts for
.IR command s
interactively.
.PP
The
.B pmieconf
.I command
language is described here:
.TP 8
.B "help  [ { . | all | global | <rule> | <group> } [<variable>] ]"
Without arguments, the
.B help
command displays the syntax for all of the available
.B pmieconf
commands.  With one argument, a description of one or more of the generalized
rules is displayed.  With two arguments, a description of a specific variable
relating to one or more of the generalized rules is displayed.
.TP 8
.B "rules  [ enabled | disabled ]"
Display the name and short summary for all of the generalized rules found on
.IR rulepath .
Each of the rule names can be used in place of the keyword
.B <rule>
in this command syntax description.
The
.B enabled
and
.B disabled
options can be used to filter the set of rules displayed to just those which
are enabled or disabled respectfully.
.TP 8
.B "groups"
Display the name of all of the rule groups that were found on
.IR rulepath .
Each of the group names can be used in place of the keyword
.B <group>
in this command syntax description, which applies the command to all rules
within the rule group.
.TP 8
.B "status"
Display status information relating to the current
.B pmieconf
session, including a list of running
.B pmie
processes which are currently using
.IR file .
.TP 8
.B "enable  { . | all | <rule> | <group> }"
Enables the specified rule or group of rules.  An enabled rule is one which
will be included in the
.B pmie
configuration file generated by
.BR pmieconf .
Any enabled "actions" will be appended to the rule's "predicate", in a
manner conforming to the
.B pmie
syntax ("actions" can be viewed using the
.B "list global"
command, described below).
.TP 8
.B "disable  { . | all | <rule> | <group> }"
Disables the specified rule or group of rules.  If the rule was previously
enabled, it will be removed from the
.B pmie
configuration file generated by
.BR pmieconf ,
and hence no longer evaluated when
.B pmie
is restarted (using
.B pmieconf
does not affect any existing
.B pmie
processes using
.IR file ).
.TP 8
.B "list  { . | all | global | <rule> | <group> } [<variable>]"
Display the values for a specific rule variable; or for all variables of
a rule, a rule group, all rules, or the global variables.
.TP 8
.B "modify  { . | all | global | <rule> | <group> } <variable> <value>"
Enable, disable, or otherwise change the value for one or more rule variables.
This value must be consistent with the type of the variable, which can be
inferred from the format of the printed value - e.g. strings will be enclosed
in double-quotes, percentages have the ``%'' symbol appended, etc.
Note that certain rule variables cannot be modified through
.B pmieconf
\- "predicate" and "help", for example.
.TP 8
.B "undo  { . | all | global | <rule> | <group> } [<variable>]"
Applicable only to a variable whose value has been modified - this
.I command
simply reverts to the default value for the given variable.
.TP 8
.B "quit"
Save any changes made to
.I file
and then exit
.BR pmieconf .
.TP 8
.B "abort"
Exit
.B pmieconf
immediately without saving any changes to
.IR file .
.PP
Each of the commands above can be shortened by simply using the first
character of the command name, and also ``?'' for help.
.PP
Use of the
.B all
keyword
causes the command to be applied to all of the rules.
The
.B global
keyword refers to those variables which are applied to every rule.
Such variables can be changed either globally or locally, for example:
.sp
.nf
  pmieconf> modify global delta "5 minutes"
  pmieconf> modify memory delta "1 minute"
.fi
.sp
causes all rules to now be evaluated once every five minutes, except
for rules in the "memory" group which are to be evaluated once per minute.
.PP
The ``.'' character is special to
.B pmieconf
\- it refers to the last successfully used value of
.BR all ,
.BR global ,
.B <rule>
or
.BR <group> .
.SH EXAMPLES
Specify that all of the rules in the "memory" group should be evaluated:
.sp
.nf
  pmieconf> modify memory enabled yes
.fi
.sp
Change your mind, and revert to using only the "memory" rules which were
enabled by default:
.sp
.nf
  pmieconf> undo memory enabled
.fi
.sp
Specify that notification of rules which evaluate to true should be sent to
.BR syslogd (1):
.sp
.nf
  pmieconf> modify global syslog_action yes
.fi
.sp
Specify that rules in the "per_cpu" group should use a different holdoff value
to other rules:
.sp
.nf
  pmieconf> help global holdoff
    rule: global  [generic parameters applied to all rules]
     var: holdoff
    help: Once the predicate is true and the action is executed,
	  this variable allows suppression of further action
	  execution until the specified interval has elapsed.
	  A value of zero enables execution of the action if
	  the rule predicate is true at the next sample. Default
	  units are seconds and common units are "second", "sec",
	  "minute", "min" and "hour".

  pmieconf> modify per_cpu holdoff "1 hour"
.fi
.sp
Lower the threshold associated with a particular variable for a specified
rule:
.sp
.nf
  pmieconf> l cpu.syscall predicate
    rule: cpu.syscall  [High aggregate system call rate]
      predicate = 
	      some_host (
		  ( kernel.all.syscall $hosts$ )
		    > $threshold$ count/sec * hinv.ncpu $hosts$
	      )

  pmieconf> m . threshold 7000

  pmieconf> l . threshold
    rule: cpu.syscall  [High aggregate system call rate]
	    threshold = 7000
.fi
.sp
.SH ENVIRONMENT
The environment variable
.B PMIECONF_PATH
has a similar function to the 
.B \-r
option described above, and if set will be used provided no
.B \-r
option is presented.
.SH FILES
.PD 0
.TP 10
.IR $PCP_VAR_DIR/config/pmieconf/ */*
generalized system resource monitoring rules
.TP 10
.I $PCP_VAR_DIR/config/pmieconf/config.pmie
default super-user settings for system resource monitoring rules
.TP 10
.I $HOME/.pcp/pmie/config.pmie
default user settings for system resource monitoring rules
.PD
.SH "PCP ENVIRONMENT"
Environment variables with the prefix
.B PCP_
are used to parameterize the file and directory names
used by PCP.
On each installation, the file
.I /etc/pcp.conf
contains the local values for these variables.
The
.B $PCP_CONF
variable may be used to specify an alternative
configuration file,
as described in
.BR pcp.conf (5).
.SH SEE ALSO
.BR PCPIntro (1),
.BR pmie (1),
.BR pmie_check (1)
and
.BR pmieconf (5).