1PMSTORE(1) General Commands Manual PMSTORE(1)
2
3
4
6 pmstore - modify performance metric values
7
9 pmstore [-fFLV?] [-h host] [-i instances] [-K spec] [-n pmnsfile] met‐
10 ricname 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), see PMNS(5), however if the -n option is specified an alterna‐
25 tive namespace 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 The available command line options are:
75
76 -f, --force
77 Store the value even if no current value set.
78
79 -F, --fetch
80 Report the metric value after setting it.
81
82 -i insts, --insts=insts
83 Restrict store to the comma-separated list of instances.
84
85 -h host, --host=host
86 Connect to pmcd(1) on host, rather than on the default localhost.
87
88 -K spec, --spec-local=spec
89 When fetching metrics from a local context (see -L), the -K option
90 may be used to control the DSO PMDAs that should be made accessi‐
91 ble. The spec argument conforms to the syntax described in
92 pmSpecLocalPMDA(3). More than one -K option may be used.
93
94 -L, --local-PMDA
95 Use a local context to collect metrics from DSO PMDAs on the local
96 host without PMCD. See also -K.
97
98 -n pmnsfile, --namespace=pmnsfile
99 Normally pmcd loads the default Performance Metrics Name Space
100 (PMNS) from $PCP_VAR_DIR/pmns/root, however if the -n option is
101 specified an alternative namespace is loaded from the file pmns‐
102 file.
103
104 -V, --version
105 Display version number and exit.
106
107 -?, --help
108 Display usage message and exit.
109
111 Two messages indicate a mismatch between the internal data type for
112 metricname and the value provided.
113
114 The value "???" is out of range for the data type (PM_TYPE_...)
115
116 The value "???" is incompatible with the data type (PM_TYPE_...)
117
119 Environment variables with the prefix PCP_ are used to parameterize the
120 file and directory names used by PCP. On each installation, the file
121 /etc/pcp.conf contains the local values for these variables. The
122 $PCP_CONF variable may be used to specify an alternative configuration
123 file, as described in pcp.conf(5).
124
126 pmcd(1), pminfo(1), pmval(1), PMAPI(3), pmFetch(3), pmSpecLocalPMDA(3),
127 pmStore(3), strtod(3), strtol(3) and PMNS(5).
128
129
130
131Performance Co-Pilot PCP PMSTORE(1)