pmie2col - convert pmie output to multi-column format
Contents
Description
pmie2col is a simple tool that converts output from pmie(1) into regular column format. Each column is 7 characters wide (by default, may be changed with the -w option) with a single space between columns. That single space can be substituted with an alternate delimiter using the -d option (this is useful for importing the data into a spreadsheet, for example). The precision of the tabulated values from pmie can be specified with the -p option (default is 2 decimal places). This option can and will override any width setting in order to present the requested precision. The pmie(1) configuration must follow these rules: (1) Each pmie(1) expression is of the form ``NAME = expr;''. NAME will be used as the column heading, and must contain no white space, although special characters can be escaped by enclosing NAME in single quotes. (2) The ``expr'' must be a valid pmie(1) expression that produces a singular value. In addition, pmie(1) must be run with the -v command line option. It is also possible to use the -e command line to pmie(1) and output lines will be prefixed by a timestamp.
Examples
Given this pmie(1) configuration file (config):
loadav=kernel.all.load#'1minute';'%usr'=kernel.all.cpu.user;'%sys'=kernel.all.cpu.sys;'%wio'=kernel.all.cpu.wait.total;'%idle'=kernel.all.cpu.idle;'max-iops'=max_inst(disk.dev.total);
Then this command pipeline:
$pmie-v-t5<config|pmie2col-w8
Produces output like this:
loadav%usr%sys%wio%idlemax-iops0.21?????0.360.490.030.180.2925.400.490.410.100.360.1351.000.690.490.100.050.3743.200.710.390.080.040.4914.000.830.630.150.000.2132.301.090.600.020.100.2747.000.920.010.000.000.992.40Name
pmie2col - convert pmie output to multi-column format
Options
The available command line options are:
-dchar, --delimiter=char
Use char as output delimiter.
-pN, --precision=N
Use n as output floating point precision.
-wN, --width=N
Use n as output column width.
-?, --help
Display usage message and exit.
Pcp Environment
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by
PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The
$PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5).
See Also
PCPIntro(1) and pmie(1). Performance Co-Pilot PCP PMIE2COL(1)
Synopsis
pmie2col [-?] [-ddelimiter] [-pprecision] [-wwidth]
