pcp
[Top] [All Lists]

Lustrecomm - Fix metric sizes, Update help

To: pcp@xxxxxxxxxxx
Subject: Lustrecomm - Fix metric sizes, Update help
From: Scott Emery <emery@xxxxxxx>
Date: Fri, 8 Oct 2010 19:08:12 -0500 (CDT)
>From 4e90ff2bb21fc29461baa3ee7f97b56cda85c0b7 Mon Sep 17 00:00:00 2001
From: Scott Emery <emery@xxxxxxx>
Date: Wed, 28 Jul 2010 16:59:28 -0700
Subject: [PATCH 5/5] - last four metrics in metrictab listed as 64 bits, but 
when we
   extract values via file_indexed() we pass in PM_TYPE_32.

      Changed lustrecomm.c as suggested.  Modified help to indicate
the size of the metrics.  Removed item from todo list.
---
 src/pmdas/lustrecomm/TODO         |    2 --
 src/pmdas/lustrecomm/help         |   11 +++++++++++
 src/pmdas/lustrecomm/lustrecomm.c |    8 ++++----
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/pmdas/lustrecomm/TODO b/src/pmdas/lustrecomm/TODO
index 3b07e09..7000aad 100644
--- a/src/pmdas/lustrecomm/TODO
+++ b/src/pmdas/lustrecomm/TODO
@@ -1,6 +1,4 @@
 
-- last four metrics in metrictab listed as 64 bits, but when we
-  extract values via file_indexed() we pass in PM_TYPE_32.
 - the fetch routine comment about PCP values not matching kernel
   values is worrying - more details there?  these sometimes need
   to be matching.  If size changes depending on 32/64 bit kernel
diff --git a/src/pmdas/lustrecomm/help b/src/pmdas/lustrecomm/help
index af3b27b..c621d09 100644
--- a/src/pmdas/lustrecomm/help
+++ b/src/pmdas/lustrecomm/help
@@ -62,44 +62,55 @@ Total bytes allocated by Lustre (inferred from 
lustre/include/obd_support.h)
 lnet/libcfs/linux/linux-proc.c: (int *)&libcfs_kmemory.counter
 Total bytes allocated by LNET. (inferred from lustre/include/obd_support.h)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.msgs_alloc first number from /proc/sys/lnet/stats
 routerstat source file: messages currently allocated (first number after M)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.msgs_max second number from /proc/sys/lnet/stats
 routerstat source file: messages maximum (highwater mark) (second
 number after M)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.errors third number from /proc/sys/lnet/stats
 routerstat source file: errors (number after E)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.send_count fourth number from /proc/sys/lnet/stats
 routerstat source file: send_count (raw data from which second number
 after S is derived).
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.recv_count fifth number from /proc/sys/lnet/stats
 routerstat source file: recv_count (raw data from which second number
 after R is derived)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.route_count sixth number from /proc/sys/lnet/stats
 routerstat source file: route_count (raw data from which second number
 after R is derived)
 
+# lnet/lnet/router_proc.c %u
 @ lustrecomm.stats.drop_count seventh number from /proc/sys/lnet/stats
 routerstat source file: drop_count (raw data from which second number
 after D is derived)
 
+# lnet/lnet/router_proc.c LPU64
 @ lustrecomm.stats.send_length eigth number from /proc/sys/lnet/stats
 routerstat source file: send_length (raw data from which first number
 after S is derived)
 
+# lnet/lnet/router_proc.c LPU64
 @ lustrecomm.stats.recv_length ninth number from /proc/sys/lnet/stats
 routerstat source file: recv_length (raw data from which first number
 after S is derived)
 
+# lnet/lnet/router_proc.c LPU64
 @ lustrecomm.stats.route_length tenth number from /proc/sys/lnet/stats
 routerstat source file: route_length (raw data from which first number
 after R is derived)
 
+# lnet/lnet/router_proc.c LPU64
 @ lustrecomm.stats.drop_length eleventh number from /proc/sys/lnet/stats
 routerstat source file: drop_length (raw data from which first number
 after D is derived)
diff --git a/src/pmdas/lustrecomm/lustrecomm.c 
b/src/pmdas/lustrecomm/lustrecomm.c
index 141fb17..cdb2b6a 100644
--- a/src/pmdas/lustrecomm/lustrecomm.c
+++ b/src/pmdas/lustrecomm/lustrecomm.c
@@ -210,19 +210,19 @@ lustrecomm_fetchCallBack(pmdaMetric *mdesc, unsigned int 
inst, pmAtomValue *atom
                 atom->l = *((long *) vp);
                break;
             case 7:
-               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_32,&aux, &vp, 7);
+               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_64,&aux, &vp, 7);
                atom->l = *((long *) vp);
                break;
             case 8:
-               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_32,&aux, &vp, 8);
+               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_64,&aux, &vp, 8);
                 atom->l = *((long *) vp);
                break;
             case 9:
-               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_32,&aux, &vp, 9);
+               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_64,&aux, &vp, 9);
                 atom->l = *((long *) vp);
                break;
             case 10:
-               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_32,&aux, &vp, 10);
+               file_indexed(&filestatetab[PROC_SYS_LNET_STATS], 
PM_TYPE_64,&aux, &vp, 10);
                 atom->l = *((long *) vp);
                break;
              default:
-- 
1.6.1.2

<Prev in Thread] Current Thread [Next in Thread>
  • Lustrecomm - Fix metric sizes, Update help, Scott Emery <=