1IOSTAT2PCP(1)               General Commands Manual              IOSTAT2PCP(1)
2
3
4

NAME

6       iostat2pcp - import iostat data and create a PCP archive
7

SYNOPSIS

9       iostat2pcp [-v] [-S start] [-t interval] [-V version] [-Z timezone] in‐
10       file outfile
11

DESCRIPTION

13       iostat2pcp reads a text file created with iostat(1) (infile) and trans‐
14       lates  this into a Performance Co-Pilot (PCP) archive with the basename
15       outfile.  If infile is ``-'' then iostat2pcp reads from standard input,
16       allowing easy preprocessing of the iostat(1) output with sed(1) or sim‐
17       ilar.
18
19       The resultant PCP archive 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  in‐
26       dex  to  improve  efficiency of replay operations for the archive).  If
27       any of these files exists already, then iostat2pcp will  not  overwrite
28       them and will exit with an error message.
29
30       The  first  output sample from iostat(1) contains a statistical summary
31       since boot time and is ignored by iostat2pcp, so the  first  real  data
32       set is the second one in the iostat(1) output.
33
34       The  best  results  are obtained when iostat(1) was run with its own -t
35       flag, so each output sample is prefixed with a timestamp.  Even  better
36       is -t with $S_TIME_FORMAT=ISO set in environment when iostat(1) is run,
37       in which case the timestamp includes the timezone.
38
39       Note that if $S_TIME_FORMAT=ISO is not used with the -t option then io‐
40       stat(1)  may  produce a timestamp controlled by LC_TIME from the locale
41       that is in a format iostat2pcp cannot parse.  The formats for the time‐
42       stamp that iostat2pcp accepts are illustrated by these examples:
43
44       2013-07-06T21:34:39+1000
45           (for the $S_TIME_FORMAT=ISO).
46
47       2013-07-06 21:34:39
48           (for  some  of  the  European formats, e.g. de_AT, de_BE, de_LU and
49           en_DK.utf8).
50
51       06/07/13 21:34:39
52           (for all of the $LC_TIME settings for English locales outside North
53           America,  e.g. en_AU, en_GB, en_IE, en_NZ, en_SG and en_ZA, and all
54           the Spanish locales, e.g. es_ES, es_MX and es_AR).
55
56       In particular, note that some common North American  $LC_TIME  settings
57       will not work with iostat2pcp (namely, en_US, POSIX and C) because they
58       use the MM/DD format which may be incorrectly converted  with  the  as‐
59       sumed  DD/MM  format.   This  is  another  reason  to recommend setting
60       $S_TIME_FORMAT=ISO.
61
62       If there are no timestamps in the input stream, iostat2pcp will try and
63       deduce the sample interval if basic Disk data (-d option for iostat(1))
64       is found.  If this fails, then the -t option may be used to specify the
65       sample  interval  in seconds.  This option is ignored if timestamps are
66       found in the input stream.
67
68       The -S option may be used to specify as start time for the  first  real
69       sample  in infile, where start must have the format HH:MM:SS.  This op‐
70       tion is ignored if timestamps are found in the input stream.
71
72       The -V option specifies the version for the output PCP archive.  By de‐
73       fault the archive version $PCP_ARCHIVE_VERSION (set to 2 in current PCP
74       releases) is used, and the only values currently supported for  version
75       are 2 or 3.
76
77       The -Z option may be used to specify a timezone.  It must have the for‐
78       mat +HHMM (for hours and minutes East of UTC) or -HHMM (for  hours  and
79       minutes  West  of  UTC).   Note in particular that neither the zoneinfo
80       (aka Olson) format, e.g. Europe/Paris, nor the Posix  TZ  format,  e.g.
81       EST+5  is  allowed  for  the  -Z option.  This option is ignored if ISO
82       timestamps are found in the input stream.  If the timezone is not spec‐
83       ified and cannot be deduced, it defaults to ``UTC''.
84
85       Some additional diagnostic output is generated with the -v option.
86
87       iostat2pcp  is  a Perl script that uses the PCP::LogImport Perl wrapper
88       around the PCP libpcp_import library, and as such could be used  as  an
89       example  to develop new tools to import other types of performance data
90       and create PCP archives.
91

OPTIONS

93       The available command line options are:
94
95       -S start
96            Specify the start time for the first sample.
97
98       -t interval
99            Specify the sample interval in seconds.
100
101       -v   Print verbose output.
102
103       -Z timezone
104            Specify the timezone to use, see above.
105

CAVEATS

107       iostat2pcp requires infile to have been created by the version  of  io‐
108       stat(1) from http://freshmeat.net/projects/sysstat.
109
110       iostat2pcp  handles  the -c (CPU), -d (Disk), -x (eXtended Disk) and -p
111       (Partition) report formats (including their -k, -m, -z  and  ALL  vari‐
112       ants), but does not accommodate the -n (Network Filesystem) report for‐
113       mat from iostat(1); this is a demand-driven limitation  rather  than  a
114       technical limitation.
115

PCP ENVIRONMENT

117       Environment variables with the prefix PCP_ are used to parameterize the
118       file and directory names used by PCP.  On each installation,  the  file
119       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
120       $PCP_CONF variable may be used to specify an alternative  configuration
121       file, as described in pcp.conf(5).
122

SEE ALSO

124       iostat(1), pmchart(1), pmie(1), pmlogger(1), sed(1), Date::Format(3pm),
125       Date::Parse(3pm), PCP::LogImport(3pm) and LOGIMPORT(3).
126
127
128
129Performance Co-Pilot                  PCP                        IOSTAT2PCP(1)
Impressum