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

NAME

6       pmlogger_daily, pmlogger_check, pmlogger_merge - administration of Per‐
7       formance Co-Pilot archive log files
8

SYNOPSIS

10       $PCP_BINADM_DIR/pmlogger_daily [-NoV] [-c  control]  [-k  discard]  [-m
11       addresses] [-s size] [-t want] [-x compress] [-X program] [-Y regex]
12       $PCP_BINADM_DIR/pmlogger_check [-NTV] [-c control]
13       $PCP_BINADM_DIR/pmlogger_merge [-fNV] [input-basename ... output-name]
14

DESCRIPTION

16       This  series  of shell scripts and associated control files may be used
17       to create a customized regime of administration and management for Per‐
18       formance Co-Pilot (see PCPintro(1)) archive log files.
19
20       pmlogger_daily  , pmlogger_check , and pmlogger_merge are equivalent to
21       the scripts cron.pmdaily, cron.pmcheck and  cron.pmlogmerge  which  are
22       deprecated but preserved on IRIX for backward compatibility.
23
24       pmlogger_daily  is  intended  to be run once per day, preferably in the
25       early morning, as soon after midnight as practicable.  Its task  is  to
26       aggregate  and  rotate  one  or  more sets of PCP archives.  After some
27       period, old PCP archives are discarded.  This  period  is  14  days  by
28       default, but may be changed using the -k option. Two special values are
29       recognized for the period (discard),  namely  0  to  keep  no  archives
30       beyond  the current one, and forever to prevent any archives being dis‐
31       carded.
32
33       Archive data files can optionally be compressed after some period (com‐
34       press),  to conserve disk space.  This is particularly useful for large
35       numbers of pmlogger processes under the control of pmlogger_check.  The
36       -x  option specifies the number of days after which to compress archive
37       data files, and the -X option specifies the program to use for compres‐
38       sion - by default this is bzip2(1).  Use of the -Y option allows a reg‐
39       ular expression to be specified causing  files  in  the  set  of  files
40       matched  for compression to be omitted - this allows only the data file
41       to be compressed, and also prevents the program from attempting to com‐
42       press     it    more    than    once.     The    default    regex    is
43       ".meta$|.index$|.Z$|.gz$|.bz2|.zip$" - such files  are  filtered  using
44       the -v option to egrep(1).
45
46       In  addition,  if  the  PCP  ``notices'' file ($PCP_LOG_DIR/NOTICES) is
47       larger than 20480 bytes, pmlogger_daily will rename  the  file  with  a
48       ``.old''  suffix, and start a new ``notices'' file.  The rotate thresh‐
49       old may be changed from 20480 to size bytes using the -s option.
50
51       Use of the -m option causes pmlogger_daily to construct  a  summary  of
52       the ``notices'' file entries which were generated in the last 24 hours,
53       and e-mail that summary to the set of space-separated addresses.   This
54       daily  summary  is stored in the file $PCP_LOG_DIR/NOTICES.daily, which
55       will be empty when no new ``notices'' entries were made in the previous
56       24 hour period.
57
58       pmlogger_check  may  be  run at any time, and is intended to check that
59       the desired set of pmlogger(1) processes are running, and if not to re-
60       launch any failed loggers.
61
62       pmlogger_merge is a wrapper script for pmlogmerge(1) that merges all of
63       the archive logs matching the input-basename arguments, and  creates  a
64       new  archive  using output-name as the base name for the physical files
65       that constitute an archive log.  The input-basename arguments may  con‐
66       tain  meta  characters  in  the  style  of sh(1).  If specified, the -f
67       option causes all of the input files to be removed once the output  ar‐
68       chive has been created.
69
70       pmlogger_merge is used by pmlogger_daily.
71
72       To  assist  with  debugging  or diagnosing intermittent failures the -t
73       option may be used.  This will turn on very verbose tracing  (-VV)  and
74       capture   the   trace   output  in  a  file  named  $PCP_LOG_DIR/pmlog‐
75       ger/daily.datestamp.trace, where datestamp is the  time  pmlogger_daily
76       was  run  in the format YYYYMMDD.HH.MM.  In addition, the want argument
77       will ensure that trace files created with -t will be kept for want days
78       and then discarded.
79
80       Both  pmlogger_daily  and pmlogger_check are controlled by a PCP logger
81       control file that specifies the pmlogger instances to be managed.   The
82       default control file is $PCP_PMLOGGERCONTROL_PATH, but an alternate may
83       be specified using the -c option.
84
85       The control file should be customized according to the following  rules
86       that define for the current version (1.1) of the control file format.
87
88       1.     Lines beginning with a ``#'' are comments.
89       2.     Lines  beginning  with  a ``$'' are assumed to be assignments to
90              environment variables in the style of sh(1), and all  text  fol‐
91              lowing  the ``$'' will be eval'ed by the script reading the con‐
92              trol file, and the  corresponding  variable  exported  into  the
93              environment.   This  is  particularly  useful  to set and export
94              variables into the environment of  the  administrative  scripts,
95              e.g.
96                  $ PMCD_CONNECT_TIMEOUT=20
97              Warning: The $PCP_PMLOGGERCONTROL_PATH file is a potential secu‐
98              rity risk and should not be writable  by  any  user  other  than
99              root.
100       3.     There must be a version line of the form:
101                  $ version=1.1
102       4.     There  should  be one line in the control file for each pmlogger
103              instance of the form:
104
105                  host y|n y|n directory args
106
107       5.     Fields within a line of the control file are separated by one or
108              more spaces or tabs.
109       6.     The  first  field  is the name of the host that is the source of
110              the performance metrics for this pmlogger instance.
111       7.     The second  field  indicates  if  this  is  a  primary  pmlogger
112              instance  (y)  or not (n).  Since the primary logger must run on
113              the local host, and there may be at most one primary logger  for
114              a  particular host, this field can be y for at most one pmlogger
115              instance, in which case the host name must be the  name  of  the
116              local host.
117       8.     The  third field indicates if this pmlogger instance needs to be
118              started under the control of pmsocks(1) to  connect  to  a  pmcd
119              through a firewall (y or n).
120       9.     The fourth field is a directory name.  All files associated with
121              this pmlogger instance will be created in  this  directory,  and
122              this will be the current directory for the execution of any pro‐
123              grams required in the maintenance of those archives.   A  useful
124              convention  is  that  primary logger archives for the local host
125              with  hostname  myhost   are   maintained   in   the   directory
126              $PCP_LOG_DIR/pmlogger/myhost (this is where the default pmlogger
127              start-up script in $PCP_RC_DIR/pcp will  create  the  archives),
128              while  archives  for  the  remote  host mumble are maintained in
129              $PCP_LOG_DIR/pmlogger/mumble.
130       10.    All other fields are interpreted as arguments to  be  passed  to
131              pmlogger(1)  and/or  pmnewlog(1).   Most typically this would be
132              the -c option.
133
134       The following sample control lines specify  a  primary  logger  on  the
135       local  host (bozo), and a non-primary logger to collect and log perfor‐
136       mance metrics from the host boing.
137
138       $version=1.1
139       bozo   y  n  $PCP_LOG_DIR/pmlogger/bozo   -c config.default
140       boing  n  n  $PCP_LOG_DIR/pmlogger/boing  -c ./pmlogger.config
141
142       Typical crontab(5) entries for periodic execution of pmlogger_daily and
143       pmlogger_check  are  given  in $PCP_VAR_DIR/config/pmlogger/crontab and
144       shown below.  Due to the file permissions  involved,  these  should  be
145       added  to the crontab for root if automated PCP archive log maintenance
146       is desired.
147
148       # daily processing of archive logs
149       14      0       *       *       *       $PCP_BINADM_DIR/pmlogger_daily
150       # every 30 minutes, check pmlogger instances are running
151       28,58   *       *       *       *       $PCP_BINADM_DIR/pmlogger_check
152
153       Alternate redirection of the output from the cron(1) execution  of  the
154       scripts may be controlled as follows:
155
156       (1) The  -V  option to the scripts will enable verbose tracing of their
157           activity.  By default the scripts generate no  output  unless  some
158           error or warning condition is encountered.
159
160       (2) To redirect the e-mail from cron(1) away from the root login,
161
162           + Instead  of using the ``root'' login, create a special IRIX login
163             with uid equal to 0, e.g. su_pcp.  The  password  may  be  locked
164             and/or the shell invalid to prevent login or su (1), but the home
165             directory should exist.   For  example  the  following  entry  in
166             /etc/passwd:
167
168                 su_pcp:x:0:0:PCP Housekeeping:/usr/people/su_pcp:/dev/null
169
170           + Create   a   $HOME/.forward   for   su_pcp,   else  an  entry  in
171             /usr/lib/aliases for su_pcp, redirecting the  e-mail  to  a  real
172             user or user(s).
173
174           + Add  the ``crontab'' entries above to the crontab file for su_pcp
175             not root, e.g. in the file /usr/spool/cron/crontabs/su_pcp
176
177       The -N option enables a ``show me'' mode, where the actions are echoed,
178       but not executed, in the style of ``make -n''.  Using -N in conjunction
179       with -V maximizes the diagnostic capabilities for debugging.
180
181       By default all possible archives will be merged.  The -o  option  rein‐
182       states  the  old  behaviour  in which only yesterday's archives will be
183       considered as merge candidates.
184
185       The -T option provides a terser form of output for pmlogger_check  that
186       is most suitable for a pmlogger ``farm'' where many instances of pmlog‐
187       ger are expected to be running.
188
189       The script $PCP_BINADM_DIR/pmlogger_daily could be copied and  modified
190       to  implement  a site-specific procedure for end-of-week and/or end-of-
191       month management for a set of PCP archives.
192

FILES

194       $PCP_PMLOGGERCONTROL_PATH
195                 the PCP logger control file
196                 Warning: this file is a potential security  risk  and  should
197                 not be writable by any user other than root.
198
199       $PCP_VAR_DIR/config/pmlogger/crontab
200                 sample crontab for automated script execution by root
201
202       $PCP_VAR_DIR/config/pmlogger/config.default
203                 default  pmlogger  configuration  file  for the local primary
204                 logger
205
206       $PCP_VAR_DIR/config/pmlogger/config.*
207                 other pmlogger configuration files suited for particular  PCP
208                 monitoring  tools,  add-on  products and application environ‐
209                 ments
210
211       $PCP_LOG_DIR/pmlogger/hostname
212                 default location for archives of performance information col‐
213                 lected from the host hostname
214
215       $PCP_LOG_DIR/pmlogger/hostname/lock
216                 transient  lock  file  to  guarantee  mutual exclusion during
217                 pmlogger administration for the host hostname -  if  present,
218                 can  be  safely  removed if neither pmlogger_daily nor pmlog‐
219                 ger_check are running
220
221       $PCP_LOG_DIR/pmlogger/hostname/Latest
222                 PCP archive folio created by mkaf(1) for  the  most  recently
223                 launched archive containing performance metrics from the host
224                 hostname
225
226       $PCP_LOG_DIR/NOTICES
227                 PCP ``notices'' file used by pmie(1) and friends
228

PCP ENVIRONMENT

230       Environment variables with the prefix PCP_ are used to parameterize the
231       file  and  directory names used by PCP.  On each installation, the file
232       /etc/pcp.conf contains the  local  values  for  these  variables.   The
233       $PCP_CONF  variable may be used to specify an alternative configuration
234       file, as described in pcp.conf(4).
235

SEE ALSO

237       bzip2(1),  cron(1),  egrep(1),  PCP(1),  pmlc(1),  pmlogger(1),  pmlog‐
238       merge(1), pmnewlog(1) and pmsocks(1).
239
240
241
242Performance Co-Pilot                  SGI                    PMLOGGER_DAILY(1)
Impressum