pcp
[Top] [All Lists]

Dynamic Proc PMDA metrics

To: pcp <pcp@xxxxxxxxxxx>
Subject: Dynamic Proc PMDA metrics
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Fri, 07 Nov 2014 15:35:06 -0500
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
Hi,

 I think I have a pretty good version of the dynamic proc metrics implemented as they relate to anything with a PID instance. My tree is here:

https://github.com/ubccr/pcp/tree/dynamic_proc

Âsrc/pmdas/linux_proc/GNUmakefileÂÂÂ |ÂÂÂ 2 +-
Âsrc/pmdas/linux_proc/helpÂÂÂÂÂÂÂÂÂÂ |Â 140 ----------
Âsrc/pmdas/linux_proc/help_text.hÂÂÂ |Â 121 +++++++++
Âsrc/pmdas/linux_proc/pmda.cÂÂÂÂÂÂÂÂ |ÂÂ 13 +-
Âsrc/pmdas/linux_proc/proc_dynamic.c |Â 477 +++++++++++++++++++++++++++++++++++
Âsrc/pmdas/linux_proc/root_procÂÂÂÂÂ |Â 129 +---------
Â6 files changed, 614 insertions(+), 268 deletions(-)
Âcreate mode 100644 src/pmdas/linux_proc/help_text.h
Âcreate mode 100644 src/pmdas/linux_proc/proc_dynamic.c


If this all looks generally ok, I'll submit my hotprocs changes on top of this. I modeled it on the basic structure of linux/interrupts.c. A couple things:

1. I ran the existing QA tests (./check -g pmda.proc) and everything seemed to be OK, except for the ordering of the metrics in 022 and 943. I don't think this can be fixed since it would mean some non-dynamic metrics would have to come in the middle. Let me know if there is a way/desire to fix the ordering.

2. I needed to use pmdaTreeRebuildHash while the interrupts code didn't. Joe pointed out that this is likely due to that fact that the linux pmda runs as a dso and proc does not. So there may be some other code that handles the dso case differently. I couldn't find this documented anywhere.

3. Couldn't find any precedent for handling long form help text for dynamic pmdas. So I just generated a header file from the existing help file and used that. Let me know if you want something different. Attached is the perl script I wrote for that in case it is generally useful.

4. I left a few commented code sections that will show where hotprocs will hook in. Will add another root node, and all other stuff ( help, etc ) will be shared.

If this looks ok, it will probably take another day to update hotprocs. Let me know if there is anything that looks wrong or needs to be changed.

Thanks

Martins

  

Attachment: convhelp.txt
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>