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] [-Z timezone] infile outfile
10

DESCRIPTION

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

OPTIONS

87       The available command line options are:
88
89       -S start
90            Specify the start time for the first sample.
91
92       -t interval
93            Specify the sample interval in seconds.
94
95       -v   Print verbose output.
96
97       -Z timezone
98            Specify the timezone to use, see above.
99

CAVEATS

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

PCP ENVIRONMENT

111       Environment variables with the prefix PCP_ are used to parameterize the
112       file and directory names used by PCP.  On each installation,  the  file
113       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
114       $PCP_CONF variable may be used to specify an alternative  configuration
115       file, as described in pcp.conf(5).
116

SEE ALSO

118       iostat(1), pmchart(1), pmie(1), pmlogger(1), sed(1), Date::Format(3pm),
119       Date::Parse(3pm), PCP::LogImport(3pm) and LOGIMPORT(3).
120
121
122
123Performance Co-Pilot                  PCP                        IOSTAT2PCP(1)
Impressum