PMLOGLABEL(1)

๐Ÿ’– PMLOGLABEL(1) ๐Ÿ’–

okay bestie, settle in, because this one is literally a lifesaver โ€” it's a General Commands Manual page for pmloglabel, and it's giving archive-rescue icon energy. ๐Ÿฉนโœจ


โœจ NAME โœจ

pmloglabel โ€” check and repair a performance metrics archive label ๐Ÿท๏ธ๐Ÿ”


๐ŸŒธ SYNOPSIS ๐ŸŒธ

pmloglabel [-lLsv?]  [-D debug] [-h hostname] [-p pid] [-V version] [-Z timezone] archive

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So pmloglabel verifies, reports on, and can modify all the details of the labels in each of the files of a Performance Co-Pilot (PCP) archive. The archive has the base name archive, and it has to have been created before with pmlogger(1). no cap.

Every single file in a PCP archive โ€” that's the metadata, the temporal index, and one or more data volumes โ€” must contain a valid label at the start, otherwise the PCP tools will straight up refuse to open the archive at all. like, they won't even look at it. ๐Ÿ’€

So that's why the primary function of pmloglabel is to be able to repair any inconsistent or corrupt label fields, so that the entire archive isn't lost forever. ๐Ÿซถ It will not check the remainder of the archive, but it will give you a fighting chance to recover otherwise lost data. Together, pmloglabel and pmlogextract are able to produce a valid PCP archive from many forms of corruption. team work makes the dream work fr fr. ๐Ÿ‘‘

Also note: if the temporal index is found to be corrupt, the "*.index" file can be safely moved aside and the archive will still be accessible โ€” however retrievals may take longer without the index. lowkey a tradeoff, but worth knowing. ๐Ÿ™ˆ

๐Ÿ’… OPTIONS ๐Ÿ’…

The available command line options are:

  • -h hostname, --host=hostname โ€” Modify the logged hostname in the archive label, for all files in the archive. ๐Ÿ 
  • -l, --label โ€” Dump out the archive label, showing the archive format version, the time and date for the start and (current) end of the archive, and the host from which the performance metrics values were collected. ๐Ÿ“‹
  • -L โ€” Like -l, just a little more verbose, showing also the timezone and creator process identifier from the archive label. ๐Ÿ—ฃ๏ธ
  • -p pid, --pid=pid โ€” Set the process identifier stored in the archive label to pid, for all files in the archive. ๐Ÿ”ข
  • -s โ€” Rewrite the sentinel values which precede and follow the archive label, for all files in the archive. ๐Ÿšง
  • -v, --verbose โ€” Verbose mode. Additional progress information is produced at each step. ๐Ÿ‘€
  • -V version, --version=version โ€” Stamp the version number into the magic number field at the start of the archive label, for all files in the archive. ๐Ÿ”ฎ
  • -Z timezone, --timezone=timezone โ€” Changes the timezone in the archive labels to timezone in the format of the environment variable TZ as described in environ(7). ๐ŸŒ
  • -?, --help โ€” Display usage message and exit. โ“

๐ŸŽ€ EXAMPLES ๐ŸŽ€

The following demonstrates the use of pmloglabel in finding and then correcting a corrupt field (PID) in the label of the temporal index of an archive named "20080125". watch her work. ๐Ÿ’…

$ pmlogdump -l 20080125
pmlogdump: Cannot open archive "20080125": Illegal label record at start of a PCP archive file
$ pmloglabel 20080125
Mismatched PID (5264/5011) between temporal index and data volume 0
$ pmloglabel -p 5264 20080125
$ pmlogdump -l 20080125
Log Label (Log Format Version 2)
Performance metrics from host fw1
  commencing Fri Jan 25 00:10:09.341 2008
  ending     Sat Jan 26 00:09:54.344 2008

โญ EXIT STATUS โญ

  • pmloglabel exits with status 0 if the archive labels are clean. โœ…
  • If invoked incorrectly, the exit status will be 1. ๐Ÿ™ƒ
  • If corruption is detected and still exists at the end, the exit status will be 2. ๐Ÿ˜ญ
  • If requested to write out the archive labels, and some aspect of that write out fails, then the exit status will be 3. ๐Ÿ’€

๐ŸŒˆ FILES ๐ŸŒˆ

  • $PCP_LOG_DIR/pmlogger/<hostname> โ€” Default directory for PCP archives containing performance metric values 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 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. ๐Ÿ›๐Ÿ”Ž


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

PCPIntro(1), pmlogcheck(1), pmlogdump(1), pmlogextract(1), pmlogger(1), pmlogger_check(1), pmlogger_daily(1), pmlogrewrite(1), pcp.conf(5) and pcp.env(5).


and that's the whole page bestie!! this one comes to you from Performance Co-Pilot / PCP, so go forth and rescue those archives, you absolute legend. periodt. ๐Ÿ’œโœจ

๐Ÿ“ฆ where this page comes from