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

NAME

6       pmloglabel - check and repair a performance metrics archive label
7

SYNOPSIS

9       pmloglabel  [-lLsv?]  [-h hostname] [-p pid] [-V version] [-Z timezone]
10       archive
11

DESCRIPTION

13       pmloglabel verifies, reports on, and can modify all details of the  la‐
14       bels  in each of the files of a Performance Co-Pilot (PCP) archive log.
15       The archive log has the base name archive and must have been previously
16       created using pmlogger(1).
17
18       Each  of  the files in a PCP archive (metadata, temporal index, and one
19       or more data volumes) must contain a valid label at the start, else the
20       PCP tools will refuse to open the archive at all.
21
22       Thus,  the  primary  function of pmloglabel is to be able to repair any
23       inconsistent or corrupt label fields, such that the entire  archive  is
24       not  lost.  It will not check the remainder of the archive, but it will
25       give you a fighting chance to recover otherwise lost  data.   Together,
26       pmloglabel  and  pmlogextract  are  able to produce a valid PCP archive
27       from many forms of corruption.
28
29       Note that if the temporal index is found to be corrupt,  the  "*.index"
30       file  can  be safely moved aside and the archive will still be accessi‐
31       ble, however retrievals may take longer without the index.
32

OPTIONS

34       The available command line options are:
35
36       -h hostname, --host=hostname
37            Modify the logged hostname in the archive label, for all files  in
38            the archive.
39
40       -l, --label
41            Dump  out  the  archive label, showing the log format version, the
42            time and date for the start and (current) end of the archive,  and
43            the host from which the performance metrics values were collected.
44
45       -L   Like -l, just a little more verbose, showing also the timezone and
46            creator process identifier from the archive label.
47
48       -p pid, --pid=pid
49            Set the process identifier stored in the archive label to pid, for
50            all files in the archive.
51
52       -s   Rewrite  the  sentinel values which precede and follow the archive
53            label, for all files in the archive.
54
55       -v, --verbose
56            Verbose mode.  Additional progress information is produced at each
57            step.
58
59       -V version, --version=version
60            Stamp  the version number into the magic number field at the start
61            of the archive label, for all files in the archive.
62
63       -Z timezone, --timezone=timezone
64            Changes the timezone in the archive labels to timezone in the for‐
65            mat of the environment variable TZ as described in environ(7).
66
67       -?, --help
68            Display usage message and exit.
69

EXAMPLES

71       The  following  demonstrates  the use of pmloglabel in finding and then
72       correcting a corrupt field (PID) in the label of the temporal index  of
73       an archive named "20080125".
74
75                 $ pmdumplog -l 20080125
76                 pmdumplog: Cannot open archive "20080125": Illegal label record at start of a PCP archive log file
77                 $ pmloglabel 20080125
78                 Mismatched PID (5264/5011) between temporal index and data volume 0
79                 $ pmloglabel -p 5264 20080125
80                 $ pmdumplog -l 20080125
81                 Log Label (Log Format Version 2)
82                 Performance metrics from host fw1
83                   commencing Fri Jan 25 00:10:09.341 2008
84                   ending     Sat Jan 26 00:09:54.344 2008
85

EXIT STATUS

87       pmloglabel exits with status 0 if the archive labels are clean.  If in‐
88       voked incorrectly, the exit status will be 1.   If  corruption  is  de‐
89       tected  and still exists at the end, the exit status will be 2.  If re‐
90       quested to write out the archive labels, and some aspect of that  write
91       out fails, then the exit status will be 3.
92

FILES

94       $PCP_LOG_DIR/pmlogger/<hostname>
95            Default  directory  for PCP archives containing performance metric
96            values collected from the host <hostname>.
97

PCP ENVIRONMENT

99       Environment variables with the prefix PCP_ are used to parameterize the
100       file  and  directory names used by PCP.  On each installation, the file
101       /etc/pcp.conf contains the  local  values  for  these  variables.   The
102       $PCP_CONF  variable may be used to specify an alternative configuration
103       file, as described in pcp.conf(5).
104

SEE ALSO

106       PCPIntro(1),  pmlogcheck(1),   pmlogextract(1),   pmlogger(1),   pmlog‐
107       ger_check(1),   pmlogger_daily(1),   pmlogrewrite(1),  pcp.conf(5)  and
108       pcp.env(5).
109
110
111
112Performance Co-Pilot                  PCP                        PMLOGLABEL(1)
Impressum