Bug 1293467 - getting "bad magic" when running pmcollectl on current data archive
getting "bad magic" when running pmcollectl on current data archive
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcp (Show other bugs)
6.7
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Nathan Scott
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 15:02 EST by Dwight (Bud) Brown
Modified: 2016-01-04 12:25 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-22 12:46:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dwight (Bud) Brown 2015-12-21 15:02:30 EST
Description of problem:
# pmcollectl -sD -p /var/log/pcp/pmlogger/<hostname>/20151221.14.26.0
pmcollectl: archive folio /var/log/pcp/pmlogger/<hostname>/20151221.14.26.0 has bad magic

# ls -l /var/log/pcp/pmlogger/<hostname>/20151221.14.26.0
-rw-r--r--. 1 pcp pcp 105656748 Dec 21 14:43 /var/log/pcp/pmlogger/<hostname>/20151221.14.26.0


Version-Release number of selected component (if applicable):
3.10.3-3

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Lukas Berk 2015-12-21 15:53:18 EST
Hi Dwight,

Are these log files from the default pmlogger instance? If so, does using the -a (archive) option work, instead of the -p option (meant for archive folio formats instead)?

Aka, something like #pmcollectl -sD -a /var/log/pcp/pmlogger/<hostname>/20151221.14.26.0
Comment 3 Dwight (Bud) Brown 2015-12-22 10:09:38 EST
-a is invalid/not supported option?  help file says -p?

# pmcollectl -sD -a /var/log/pcp/pmlogger/<hostname>/20151222.00.10.0 
pmcollectl: invalid option -- 'a'
Usage: pmcollectl [options]
Interactive: [-v] [-h host] [-s subsys] [-c N] [-i N] [-R N]
Write raw logfile: pmcollectl -f rawfile [-c N] [-i N] [-R N]
Read raw logfile: pmcollectl -p rawfile

Options:
  -v, --verbose         Produce verbose output
  -p, --playback        Read sample data from file
  -c COUNT, --count=COUNT
                        Number of samples
  -f FILENAME, --filename=FILENAME
                        Name of output file
  -R N, --runtime=N     How long to take samples
  -i N, --interval=N    The sample time interval
  -s SUBSYS, --subsys=SUBSYS
                        The subsystem to sample
  -h HOST, --host=HOST  metrics source is PMCD on host
  -V, --version         display version number and exit
  -?, --help            show this usage message and exit
Comment 4 Frank Ch. Eigler 2015-12-22 10:14:56 EST
Older pmcollectl only deals with "archive folios", which are like groups of archive files, and reads from them with the -p (playback) option.  Newer pmcollectl deals directly with archives too, and reads from them with the more pcp-typical -a option.
Comment 5 Frank Ch. Eigler 2015-12-22 12:46:08 EST
One can create archive-folios from archive files using the mkaf program:

# cd /var/log/pcp/*/$HOSTNAME
# /usr/libexec/pcp/bin/mkaf ARCHIVE-FILE > my.af
# cat my.af 
[...]
# pmcollectl -p my.af

(Note that the .af file should be in the same directory as the archives themselves.)

Note You need to log in before you can comment on or make changes to this bug.