Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sar2pcp(1) [centos man page]

SAR2PCP(1)						       Performance Co-Pilot							SAR2PCP(1)

NAME
sar2pcp - Import sar data and create a PCP archive SYNOPSIS
sar2pcp infile outfile DESCRIPTION
sar2pcp is intended to read a binary System Activity Reporting (sar) data file as created by sadc(1) (infile) and translate this into a Performance Co-Pilot (PCP) archive with the basename outfile. However, if infile has the suffix ".xml", then it will be considered already in XML format and sar2pcp will operate directly on it. The resultant PCP achive may be used with all the PCP client tools to graph subsets of the data using pmchart(1), perform data reduction and reporting, filter with the PCP inference engine pmie(1), etc. A series of physical files will be created with the prefix outfile. These are outfile.0 (the performance data), outfile.meta (the metadata that describes the performance data) and outfile.index (a temporal index to improve efficiency of replay operations for the archive). If any of these files exists already, then sar2pcp will not overwrite them and will exit with an error message of the form __pmLogNewFile: "blah.0" already exists, not over-written sar2pcp is a Perl script that uses the PCP::LogImport Perl wrapper around the PCP libpcp_import library, and as such could be used as an example to develop new tools to import other types of performance data and create PCP archives. A Python wrapper module is also available. CAVEATS
When not using the XML input option, sar2pcp requires infile to have been created by a version of sadc(1) from <http://sebastien.godard.pagesperso-orange.fr/> which includes the sadf(1) utility to translate infile into an XML stream (any since version 6); sar2pcp will automatically run sadf(1) and translate the resultant XML into a PCP archive. When using binary sadc files it is important to ensure the installed sadf is compatible with the version of sadc that originally generated the binary files. Simply assuming a newer installed version will work is unfortunately far too optimistic, and nor should one assume that binary data from different platforms (e.g. different endianness) will work - these issues are due to limitations in sadc and sadf, and not in sar2pcp itself. Fortunately, the sadf message indicating that an incompatibility has been detected is consistent across versions, and is always prefixed Invalid system activity file Using an XML infile has the advantage that the installed version of sadf is completely bypassed. sar2pcp undertakes to transform any valid XML produced by any of the different variations of sadf into a valid PCP archive. Any version of PCP will be able to interpret the archive files produced by any version of sar2pcp, and you are also free to move the binary PCP archive between different platforms, different hardware, even different operating systems - it Just Works (TM). SEE ALSO
pmie(1), pmchart(1), pmlogger(1), pmlogextract(1), pmlogsummary(1), sadc(1), sadf(1), sar(1), Date::Parse(3pm), Date::Format(3pm), PCP::LogImport(3pm), XML::TokeParser(3pm) and LOGIMPORT(3). 3.8.10 Performance Co-Pilot SAR2PCP(1)

Check Out this Related Man Page

PMTRIMNAMESPACE(3)					     Library Functions Manual						PMTRIMNAMESPACE(3)

NAME
pmTrimNameSpace - prune a performance metrics name space C SYNOPSIS
#include <pcp/pmapi.h> int pmTrimNameSpace(void); cc ... -lpcp DESCRIPTION
If the current Performance Metrics Application Programming Interface (PMAPI) context corresponds to a version 1 archive log of Performance Co-Pilot (PCP) performance metrics (as collected by pmlogger(1) -V1), then the currently loaded Performance Metrics Name Space (PMNS), is trimmed to exclude metrics for which no description can be found in the archive. The PMNS is further trimmed to remove empty subtrees that do not contain any performance metric. Since PCP archives usually contain some subset of all metrics named in the default PMNS, pmTrimNameSpace effectively trims the applica- tion's PMNS to contain only the names of the metrics in the archive. Since PCP 2.0, pmTrimNameSpace is only needed for dealing with version 1 archives. Version 2 archives actually store the "trimmed" PMNS. Prior to any trimming, the PMNS is restored to the state as of the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), so the effects of consecutive calls to pmTrimNameSpace with archive contexts are not additive. If the current PMAPI context corresponds to a host and a pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) call was made, then the PMNS reverts to all names loaded into the PMNS at the completion of the last pmLoadASCIINameSpace(3) or pmLoadNameSpace(3), i.e. any trimming is undone. On success, pmTrimNameSpace returns zero. SEE ALSO
pmlogger(1), PMAPI(3), pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmNewContext(3) and pmns(5). DIAGNOSTICS
PM_ERR_NOPMNS you must have loaded a PMNS using pmLoadASCIINameSpace(3) or pmLoadNameSpace(3) before calling pmTrimNameSpace PM_ERR_NOCONTEXT the current PMAPI context is invalid Performance Co-Pilot PCP PMTRIMNAMESPACE(3)
Man Page