1PMSTORE(1) General Commands Manual PMSTORE(1)
2
3
4
6 pmstore - modify performance metric values
7
9 pmstore [-LfF] [-h host] [-i instances] [-K spec] [-n pmnsfile] metric‐
10 name value
11
13 Under certain circumstances, it is useful to be able to modify the val‐
14 ues of performance metrics, for example to re-initialize counters or to
15 assign new values to metrics that act as control variables.
16
17 pmstore changes the current values for the nominated instances of a
18 single performance metric, as identified by metricname and the list of
19 instance identifiers following the -i argument. instances must be a
20 single argument, with elements of the list separated by commas and/or
21 white space. By default all instances of metricname will be updated.
22
23 Normally pmstore operates on the default Performance Metrics Name Space
24 (PMNS), however if the -n option is specified an alternative namespace
25 is loaded from the file pmnsfile.
26
27 Unless directed to another host by the -h option, pmstore will interact
28 with the Performance Metric Collector Daemon (PMCD) on the local host.
29
30 The -L option causes pmstore to use a local context to store to metrics
31 from PMDAs on the local host without PMCD. Only some metrics are
32 available in this mode. The -h and -L options are mutually exclusive.
33
34 The -f option forces the given value to be stored, even if there is no
35 current value set.
36
37 The interpretation of value is dependent on the syntax used in its
38 specification and the underlying data type of metricname, as follows.
39
40 1. If the metric has an integer type, then value should be an optional
41 leading hyphen, followed either by decimal digits or ``0x'' and
42 some hexadecimal digits. ``0X'' is also acceptable in lieu of
43 ``0x''. See strtol(3) and the related routines.
44
45 2. If the metric has a floating point type, then value should be
46 either in the form of an integer described above, or a fixed point
47 number, or a number in scientific notation. See strtod(3).
48
49 3. If the metric has a string type, then value is interpreted as a
50 literal string of ASCII characters.
51
52 4. If the metric has any other type (i.e. PM_TYPE_EVENT or
53 PM_TYPE_AGGREGATE) then no encoding of value from the command line
54 makes sense, and the values of these metrics cannot be modified
55 with pmstore.
56
57 The output reports the old value and the new value for each updated
58 instance of the requested metric.
59
60 When using the -L option to fetch metrics from a local context, the -K
61 option may be used to control the DSO PMDAs that should be made acces‐
62 sible. The spec argument conforms to the syntax described in pmSpecLo‐
63 calPMDA(3). More than one -K option may be used.
64
65 Normally pmstore will report the old value (as initially retrieved
66 using pmFetch(3)) and the new value from the command line. The -F
67 option forces another pmFetch(3) after the pmStore(3) and the returned
68 value is reported as the new value. This is useful in cases where met‐
69 ricname is a metric that provides different semantics for the store
70 operation, e.g. to increment the current value or reset a counter
71 (independent of the value from the command line).
72
74 $PCP_VAR_DIR/pmns/*
75 default PMNS specification files
76
78 Environment variables with the prefix PCP_ are used to parameterize the
79 file and directory names used by PCP. On each installation, the file
80 /etc/pcp.conf contains the local values for these variables. The
81 $PCP_CONF variable may be used to specify an alternative configuration
82 file, as described in pcp.conf(5).
83
85 pmcd(1), pminfo(1), pmval(1), PMAPI(3), pmFetch(3), pmSpecLocalPMDA(3),
86 pmStore(3), strtod(3) and strtol(3).
87
89 Two messages indicate a mismatch between the internal data type for
90 metricname and the value provided.
91
92 The value "???" is out of range for the data type (PM_TYPE_...)
93
94 The value "???" is incompatible with the data type (PM_TYPE_...)
95
96
97
98Performance Co-Pilot PCP PMSTORE(1)