'\"macro stdmacro .\" .\" Copyright (c) 2012 Red Hat. .\" Copyright (c) 2010 Ken McDonell. All Rights Reserved. .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; either version 2 of the License, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" .TH PMIUNITS 3 "PCP" "Performance Co-Pilot" .SH NAME \f3pmiUnits\f1, \f3pmiExtraUnits\f1, \f3pmiID\f1, \f3pmiInDom\f1 \- construct core metric data structures .SH "C SYNOPSIS" .ft 3 .ad l .hy 0 #include .br #include .sp pmID pmiID(int \fIdomain\fP, int \fIcluster\fP, int \fIitem\fP); .br pmInDom pmiInDom(int \fIdomain\fP, int \fIserial\fP); .br pmUnits pmiUnits(int \fIdimSpace\fP, 'in +\w'pmUnits pmiUnits('u int\ \fIdimTime\fP, int\ \fIdimCount\fP, unsigned\ int\ \fIscaleSpace\fP, unsigned\ int\ \fIscaleTime\fP, unsigned\ int\ \fIscaleCount\fP); .in .br pmUnits pmiExtraUnits(int \fIdimSpace\fP, 'in +\w'pmExtraUnits pmiUnits('u int\ \fIdimTime\fP, int\ \fIdimCount\fP, unsigned\ int\ \fIscaleSpace\fP, unsigned\ int\ \fIscaleTime\fP, unsigned\ int\ \fIscaleCount\fP, int \fIextraUnit\fP, unsigned\ int\ \fIextraScale\fP); .in .sp cc ... \-lpcp_import \-lpcp .hy .ad .ft 1 .SH "Perl SYNOPSIS" .ft 3 .ad l .hy 0 use PCP::LogImport; .sp $pmid = pmiID($\fIdomain\fP, $\fIcluster\fP, $\fIitem\fP); .br $indom = pmiInDom($\fIdomain\fP, $\fIserial\fP); .br $units = pmiUnits($\fIdimSpace\fP, 'in +\w'$units = pmiUnits('u $\fIdimTime\fP, $\fIdimCount\fP, $\fIscaleSpace\fP, $\fIscaleTime\fP, $\fIscaleCount\fP); .in .br $units = pmiExtraUnits($\fIdimSpace\fP, 'in +\w'$units = pmiExtraUnits('u $\fIdimTime\fP, $\fIdimCount\fP, $\fIscaleSpace\fP, $\fIscaleTime\fP, $\fIscaleCount\fP, $\fIextraUnit\fP, $\fIextraScale\fP); .in .hy .ad .ft 1 .SH "Python SYNOPSIS" .ft 3 .ad l .hy 0 from pcp import pmi .sp \fIpmid\fP = pmi.pmiLogImport.pmiID(\fIdomain\fP, \fIcluster\fP, \fIitem\fP) .br \fIindom\fP = pmi.pmiLogImport.pmiInDom(\fIdomain\fP, \fIserial\fP) .br \fIunits\fP = pmi.pmiLogImport.pmiUnits(\fIdim_space\fP, \fIdim_time\fP, \fIdim_count\fP, 'in +\w'pmi.pmiLogImport.pmiUnits('u \fIscale_space\fP, \fIscale_time\fP, \fIscale_count\fP) .in .hy .ad .ft 1 .SH DESCRIPTION As part of the Performance Co-Pilot Log Import API (see .BR LOGIMPORT (3)), these routines provide convenience methods (especially for script use) for constructing .BR pmID , .B pmInDom and .B pmUnits structures respectively, to be used in subsequent calls to .BR pmiAddMetric (3) and .BR pmiAddInstance (3). .PP Refer to .BR pmLookupDesc (3) for a complete description of the values and semantics of the components of a .B pmUnits structure, and hence the valid argument values for .B pmiUnits and .BR pmiExtraUnits . .SH SEE ALSO .BR LOGIMPORT (3), .BR pmiAddMetric (3), .BR pmiAddInstance (3) and .BR pmLookupDesc (3).