This series of shell scripts and associated control files may be used to
create a customized regime of administration and management for the
Performance Co-Pilot (see
is intended to be run once per day, preferably in the early morning, as
soon after midnight as practicable. Its task is to rotate the log files
for the running
processes - these files may grow without bound if the
``print'' action is used, or any other
action writes to its stdout/stderr streams.
After some period, old
log files are discarded.
This period is 14 days by default, but may be changed using the
option. Two special values are recognized for the period (discard),
to keep no log files beyond the current one, and
to prevent any log files being discarded.
Log files can optionally be compressed after some period (compress),
to conserve disk space. This is particularly useful for large numbers of
processes under the control of
option specifies the number of days after which to compress archive data
files, and the
option specifies the program to use for compression - by default this is
Use of the
option allows a regular expression to be specified causing files in
the set of files matched for compression to be omitted - this allows
only the data file to be compressed, and also prevents the program from
attempting to compress it more than once. The default
is ".meta$|.index$|.Z$|.gz$|.bz2|.zip$" - such files are filtered using the
Use of the
to construct a summary of the log files generated for all monitored hosts
in the last 24 hours (lines matching `` OK '' are culled), and e-mail that
summary to the set of space-separated
may be run at any time, and is intended to check that the desired set
processes are running, and if not to re-launch any failed inference engines.
Use of the
option provides the reverse functionality, allowing the set of
processes to be cleanly shutdown.
are controlled by a PCP inference engine control file that specifies the
instances to be managed. The default control file is
but an alternate may be specified using the
The control file should be customized according to the following rules.
Lines beginning with a ``#'' are comments.
Lines beginning with a ``$'' are assumed to be
assignments to environment variables in the style of
and all text following the ``$'' will be
by the script reading the control file,
and the corresponding variable exported into the environment.
This is particularly
useful to set and export variables into the environment of
the administrative script, e.g.
file is a potential security risk if it is writable by any user other
There should be one line in the control file
instance of the form:
Fields within a line of the control file
are separated by one or more spaces or tabs.
field is the name of the host that is the default source of the
performance metrics for this
field indicates whether this
instance needs to be started under the control of
to connect to a
through a firewall (y
is part of the
product distribution, rather than the
distribution, and as such may not be installed on your system. Refer to
for full details.
field is the name of the
activity log file.
A useful convention is that
instances monitoring the local host
are maintained in the directory
while activity logs for the remote host
are maintained in
This is consistent with the way
maintains its activity logs and archive files.
All other fields are interpreted as arguments to be passed to
Most typically this would be the
The following sample control lines specify one
instance monitoring the local host (wobbly),
and another monitoring performance metrics from the host
wobbly n PCP_LOG_DIR/pmie/wobbly -c pmie/config.default
splat n PCP_LOG_DIR/pmie/splat -c pmie/splat/cpu.conf
entry for periodic execution of
is given in
and shown below.
# daily processing of pmie logs
14 0 * * * $PCP_BINADM_DIR/pmie_daily
# every 30 minutes, check pmie instances are running
28,58 * * * * $PCP_BINADM_DIR/pmie_check
Alternate redirection of the output from the
execution of the script may be controlled as follows:
option to the script will enable verbose tracing of their activity.
By default the script generates no output unless some error or warning
condition is encountered.
To redirect the e-mail from
away from the root login,
Instead of using the ``root'' login,
create a special account with uid equal to 0, e.g. su_pcp.
The password may be locked and/or the shell invalid to prevent login
but the home directory should exist.
For example the following entry in
else an entry in
redirecting the e-mail to a real user or user(s).
Add the ``crontab'' entries above to the crontab file for
e.g. in the file
option enables a ``show me'' mode, where the actions are echoed,
but not executed, in the style of ``make -n''.
in conjunction with
maximizes the diagnostic capabilities for debugging.
the default PCP inference engine control file
this file is a potential security risk if it is writable by any user
other than root.
sample crontab for automated script execution by root
default location for the pmie log file for the host
transient lock file to guarantee mutual exclusion during
administration for the host
- if present, can be safely removed if neither
Environment variables with the prefix
are used to parameterize the file and directory names
used by PCP.
On each installation, the file
contains the local values for these variables.
variable may be used to specify an alternative
as described in