From nscott@aconex.com Mon Jan 29 18:59:54 2007 Received: with ECARTIS (v1.0.0; list pcp); Mon, 29 Jan 2007 19:00:00 -0800 (PST) X-Spam-oss-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r497472 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l0U2xpqw021467 for ; Mon, 29 Jan 2007 18:59:53 -0800 Received: from edge (unknown [203.89.192.141]) by postoffice.aconex.com (Postfix) with ESMTP id E5099AAC4C9; Tue, 30 Jan 2007 13:24:22 +1100 (EST) Subject: [PATCH] Fix units for several Linux counter metrics From: Nathan Scott Reply-To: nscott@aconex.com To: Michael Newton , Mark Goodwin Cc: pcp@oss.sgi.com Content-Type: multipart/mixed; boundary="=-2xyYXquiz89LDC3Io0jX" Organization: Aconex Date: Tue, 30 Jan 2007 13:37:30 +1100 Message-Id: <1170124650.18017.256.camel@edge> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 X-archive-position: 841 X-ecartis-version: Ecartis v1.0.0 Sender: pcp-bounce@oss.sgi.com Errors-to: pcp-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: pcp Content-Length: 2102 Lines: 70 --=-2xyYXquiz89LDC3Io0jX Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi guys, Attached patch fixes up the units for a handful of the per-process counter metrics in the Linux PMDA. cheers. -- Nathan --=-2xyYXquiz89LDC3Io0jX Content-Disposition: attachment; filename=fix-linux-proc-units Content-Type: text/x-patch; name=fix-linux-proc-units; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: devpcp/src/pmdas/linux/pmda.c =================================================================== --- devpcp.orig/src/pmdas/linux/pmda.c 2007-01-30 13:29:22.460176500 +1100 +++ devpcp/src/pmdas/linux/pmda.c 2007-01-30 13:32:34.456175500 +1100 @@ -1161,22 +1161,22 @@ static pmdaMetric metrictab[] = { /* proc.psinfo.minflt */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,9), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.cmin_flt */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,10), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.maj_flt */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,11), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.cmaj_flt */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,12), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.utime */ { NULL, @@ -1301,12 +1301,12 @@ static pmdaMetric metrictab[] = { /* proc.psinfo.nswap */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,35), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.cnswap */ { NULL, { PMDA_PMID(CLUSTER_PID_STAT,36), PM_TYPE_U32, PROC_INDOM, PM_SEM_COUNTER, - PMDA_PMUNITS(0,0,0,0,0,0) } }, + PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) } }, /* proc.psinfo.exit_signal */ { NULL, --=-2xyYXquiz89LDC3Io0jX--