PMLOGCHECK(1)
π PMLOGCHECK π
okay bestie, welcome to pmlogcheck(1), a General Commands Manual page, and honestly? she's the detective of the PCP archive world. let's get into it π
β¨ NAME β¨
pmlogcheck β checks for invalid data in a PCP archive π
πΈ SYNOPSIS πΈ
pmlogcheck [-flmRrvwz?] [-D debug] [-n pmnsfile] [-S start] [-T finish]
[-Z timezone] archive ...
π DESCRIPTION π
so basically, pmlogcheck prints info about the nature of any invalid data it finds in the files of PCP archives. and for some limited cases it also gives you a ``repair'' facility. like, she doesn't just point at the problem, she can sometimes fix it too. queen behavior π
every archive has the base name archive and it must have been created beforehand using pmlogger(1). alternatively, archive can be the name of a physical file that forms part of a PCP archive. either works, she's flexible.
when multiple archive options are present, all of the corresponding PCP archives get checked. however β and this is the lil detail people miss β if the archive options are file names, then each associated PCP archive gets checked at most once. no double-dipping. periodt.
π OPTIONS π
here's the whole menu, no skips, no cuts:
-f,--fullβ normally, most errors in Pass 0 (peep below) are serious enough thatpmlogcheckwill just exit when this happens. the-foption forces her to keep going, even when serious errors show up. main character energy, she does NOT quit π«Ά-l,--labelβ prints the archive label, showing the archive format version, the time and date for the start and (current) end of the archive, and the host the performance metrics values were collected from.-m,--metadataonlyβ skips Pass 3 (yep, below) and only checks the archive meta data. this can run substantially faster when you don't need the volume data checked, especially on archives with compressed data volume(s). it's giving speedrun β¨- *
-n*pmnsfile,--namespace=pmnsfile β loads an alternative Performance Metrics Name Space (PMNS(5)) from the file pmnsfile. -R,--auto-repairβ tries to repair any structural damage, and in particular, when files are incomplete (usually from a system crash or filesystem out of space conditions), truncates them to preserve as much complete information as possible. truncation only works for uncompressed files, so any archive with compressed file components will need to be uncompressed first withpmlogdecompress(1).
any repair option implies -f.
some problemspmlogcheckdetects are not best resolved by file truncation (e.g.pmlogrewrite(1)may be a better option), so it's recommended thatpmlogcheckis first run without-Rto determine the scope of any issues, or repair interactively with-r. fr fr, scope it out first π
-r,--repairβ same repair functions as-R, but-rrequirespmlogcheckto be run interactively, and it will prompt the user and demand a positive response before any file is truncated. she's asking for consent, as she should π- *
-S*starttime,--start=starttime β specify the starttime of the time window over which metrics should be checked in Pass 3 (see below). refer toPCPIntro(1)for a complete description of the syntax for starttime. - *
-T*endtime,--finish=endtime β specify the endtime of the time window over which metrics should be checked in Pass 3 (see below). refer toPCPIntro(1)for a complete description of the syntax for endtime. -v,--verboseβ enable verbose mode. she will yap (affectionately).-w,--nowrapβ suppresses reporting of counter wraps.-z,--hostzoneβ uses the local timezone of the host that is the source of the performance metrics archive. the default is to use the timezone of the local host.- *
-Z*timezone,--timezone=timezone β uses timezone for the date and time. timezone is in the format of the environment variableTZas described inenviron(7). the default is to use the timezone of the local host. -?,--helpβ displays the usage message and exits.
π OPERATION π
the checking proceeds in a number of passes, each one designed to validate progressively more complex semantic relationships between the info in a PCP archive. it's a whole character arc, honestly.
Pass 0
each physical file of the PCP archive is processed to make sure the label records are valid and consistent, and that each file contains an integral number of physical records with correct header and trailer fields.
any errors at this stage are usually fatal. the PCP archive is probably damaged beyond repair, and no more passes of pmlogcheck are attempted. π
Pass 1
validates the integrity of the temporal index, usually archive.index.
since the temporal index is (strictly speaking) optional, errors at this stage are handled by marking the index as bad and ignoring it for the rest of the pmlogcheck passes.
permanent repair can be achieved by removing the temporal index file and then making a copy of the PCP archive using pmlogrewrite(1) or pmlogextract(1). this creates a new temporal index for the copied archive as a side-effect. iconic little bonus π
Pass 2
validates the integrity of the metadata file, usually archive.meta.
Pass 3
validates the integrity of each of the volumes of the PCP archive, usually archive.0, archive.1, etc.
there are some basic integrity checks to make sure the encoding of values for each metric stays consistent and the values are well formed across all the observations in the archive.
also, the timestamps for the observations are expected to be monotonically increasing as the archive is traversed. β°
additional attention is given to counter metrics (type from pmLookupDesc(3) is PM_SEM_COUNTER) which are expected to have monotonically increasing values. if the values are not monotonic increasing, that may suggest a counter wrap has happened, or there's been some interruption or reset to the underlying source of the performance data that is not captured in the archive.
for each counter metric detected as having wrapped at some point in the archive, pmlogcheck produces output describing the metric name (with instance identifiers where appropriate), the internal storage type for the metric, the value of the metric before the counter wrap (with its associated timestamp), and the value of the metric after the wrap (also with a timestamp). receipts, basically π§Ύ
the -w option may be used to suppress reporting of counter wraps.
pmlogcheck produces two different timestamp formats, depending on the interval over which it is run. for an interval greater than 24 hours, the date is displayed in addition to the time at which the counter wrap occurred. if the extent of the data being checked is less than 24 hours, a more precise format is used (time is displayed with millisecond precision, but without the date).
π¦ EXAMPLES π¦
the following are all equivalent:
$ pmlogcheck myarchive
$ pmlogcheck myarchive.0
$ pmlogcheck myarchive.meta
$ pmlogcheck myarchive.0 myarchive.meta
if the current directory contains multiple PCP archives, then the command
$ pmlogcheck *.meta*
will check them all, as there is one .meta file for each PCP archive β but this file may have been compressed (hence the trailing *). the little * is doing so much work bestie β
π FILES π
$PCP_VAR_DIR/pmns/*β default PMNS specification files$PCP_LOG_DIR/pmlogger/<hostname>β default directory for PCP archives containing performance data collected from the host hostname.
π PCP ENVIRONMENT π
environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. on each installation, the file /etc/pcp.conf contains the local values for these variables. the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).
π₯ DEBUGGING OPTIONS π₯
the -D or --debug option enables the output of additional diagnostics on stderr to help triage problems β although ngl, the information is sometimes cryptic and primarily intended to provide guidance for developers rather than for end-users. debug is a comma separated list of debugging options; use pmdbg(1) with the -l option to obtain a list of the available debugging options and their meaning.
debugging options specific to pmlogcheck are as follows:
appl0β dump eachpmResultprocessedappl1β report each time a new metric-instance pair is seenappl2β report counter values as part of wrap detectionappl3β report elapsed and cpu time for each pass
π SEE ALSO π
PCPIntro(1), pmlogdecompress(1), pmlogdump(1), pmlogextract(1), pmlogger(1), pmlogrewrite(1), pmlogsummary(1), PMAPI(3), pmLookupDesc(3), PMNS(5), pcp.conf(5) and pcp.env(5).
okay that's the whole page, you ate that π
this lil number comes to you from Performance Co-Pilot / PCP, and it's PMLOGCHECK(1) β go check some archives, bestie, and remember: scope it out with a plain run before you let -R start truncating things ππ«Άπ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms