Section: Performance Co-Pilot (1)
Updated: Performance Co-PilotIndex
iostat2pcp - Import iostat data and create a PCP archive
] [-S start
] [-t interval
] [-Z timezone
] infile outfile
reads a text file created withiostat
) and translates this into a PerformanceCo-Pilot (PCP
) archive with the basename outfile
is ``-'' then iostat2pcp
reads forstandard input, allowing easy preprocessing of the iostat
(1) outputwith sed
(1) or similar.
The resultant PCP achive may be used with all the PCP client toolsto graph subsets of the data using pmchart(1),perform data reduction and reporting, filter withthe 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) andoutfile.index (a temporal index to improve efficiency of replayoperations for the archive). If any of these files exists already,then iostat2pcp will not overwrite them and will exit with an errormessage.
The first output sample from iostat(1) contains a statistical summarysince boot time and is ignored by iostat2pcp, so the first real dataset is the second one in the iostat(1) output.
The best results are obtained when iostat(1) was run with its own -tflag, so each output sample is prefixed with a timestamp. Even betteris -t with $S_TIME_FORMAT=ISO set in environment when iostat(1)is run, in which case the timestamp includes the timezone.
If there are no timestamps in the input stream, iostat2pcp willtry and deduce the sample interval if basic Disk data (-doption for iostat(1)) is found. If this fails, then the -t option may beused to specify the sample interval in seconds.This option is ignored if timestamps are found in the input stream.
The -S option may be used to specify as start time for thefirst real sample in infile, where start must have the formatHH:MM:SS.This option is ignored if timestamps are found in the input stream.
The -Z option may be used to specify a timezone. It must have theformat +HHMM (for hours and minutes East of UTC) or -HHMM (for hoursand minutes West of UTC). Note in particular that neither the zoneinfo(aka Olson) format, e.g. Europe/Paris, nor the Posix TZ format, e.g.EST+5 is allowed for the -Z option.This option is ignored if ISO timestamps are found in the input stream.If the timezone is not specified and cannot be deduced, it defaults to``UTC''.
Some additional diagnostic output is generated with the -v option.
iostat2pcp is a Perl script that uses the PCP::LogImport Perl wrapperaround the PCP libpcp_importlibrary, and as such could be used as an example to develop newtools to import other types of performance data and create PCP archives.
to have been created by the versionof iostat
iostat2pcp handles the -c (CPU), -d (Disk), -x (eXtendedDisk) and -p (Partition) report formats (including their -k, -m,-z andALL variants), but does not accommodate the -n (Network Filesystem)report format from iostat(1); this is a demand-driven limitation ratherthan a technical limitation.
- SEE ALSO
This document was created byman2html,using the manual pages.