1SAR2PCP(1) General Commands Manual SAR2PCP(1)
2
3
4
6 sar2pcp - import sar data and create a PCP archive
7
9 sar2pcp infile outfile
10
12 sar2pcp is intended to read a binary System Activity Reporting (sar)
13 data file as created by sadc(1) (infile) and translate this into a Per‐
14 formance Co-Pilot (PCP) archive with the basename outfile.
15
16 However, if infile has the suffix ``.xml'', then it will be considered
17 already in XML format and sar2pcp will operate directly on it.
18
19 The resultant PCP achive may be used with all the PCP client tools to
20 graph subsets of the data using pmchart(1), perform data reduction and
21 reporting, filter with the PCP inference engine pmie(1), etc.
22
23 A series of physical files will be created with the prefix outfile.
24 These are outfile.0 (the performance data), outfile.meta (the metadata
25 that describes the performance data) and outfile.index (a temporal
26 index to improve efficiency of replay operations for the archive). If
27 any of these files exists already, then sar2pcp will not overwrite them
28 and will exit with an error message of the form
29
30 __pmLogNewFile: ``blah.0'' already exists, not over-written
31
32 sar2pcp is a Perl script that uses the PCP::LogImport Perl wrapper
33 around the PCP libpcp_import library, and as such could be used as an
34 example to develop new tools to import other types of performance data
35 and create PCP archives. A Python wrapper module is also available.
36
38 When not using the XML input option, sar2pcp requires infile to have
39 been created by a version of sadc(1) from
40 <http://sebastien.godard.pagesperso-orange.fr/> which includes the
41 sadf(1) utility to translate infile into an XML stream (any since ver‐
42 sion 6); sar2pcp will automatically run sadf(1) and translate the
43 resultant XML into a PCP archive.
44
45 When using binary sadc files it is important to ensure the installed
46 sadf is compatible with the version of sadc that originally generated
47 the binary files. Simply assuming a newer installed version will work
48 is unfortunately far too optimistic, and nor should one assume that
49 binary data from different platforms (e.g. different endianness) will
50 work - these issues are due to limitations in sadc and sadf, and not in
51 sar2pcp itself.
52
53 Fortunately, the sadf message indicating that an incompatibility has
54 been detected is consistent across versions, and is always prefixed
55
56 Invalid system activity file
57
58 Using an XML infile has the advantage that the installed version of
59 sadf is completely bypassed. sar2pcp undertakes to transform any valid
60 XML produced by any of the different variations of sadf into a valid
61 PCP archive. Any version of PCP will be able to interpret the archive
62 files produced by any version of sar2pcp, and you are also free to move
63 the binary PCP archive between different platforms, different hardware,
64 even different operating systems - it Just Works (TM).
65
67 Environment variables with the prefix PCP_ are used to parameterize the
68 file and directory names used by PCP. On each installation, the file
69 /etc/pcp.conf contains the local values for these variables. The
70 $PCP_CONF variable may be used to specify an alternative configuration
71 file, as described in pcp.conf(5).
72
74 pmie(1), pmchart(1), pmlogger(1), pmlogextract(1), pmlogsummary(1),
75 sadc(1), sadf(1), sar(1), Date::Parse(3pm), Date::Format(3pm),
76 PCP::LogImport(3pm), XML::TokeParser(3pm) and LOGIMPORT(3).
77
78
79
80Performance Co-Pilot PCP SAR2PCP(1)