Nathan,
Hi Martins,
I've had time to go through the code in detail now - this looks like a
good step forward, and its much simpler than I expected.
Thanks for the review.
I think the approach of merging the two PMDAs has worked well. Since
hotproc was originally written, the dynamic metrics concept has come
along and I think it'll be a better match here than any namespace file
script approach. Some more notes in the review - but, if I can help
with coding this aspect, just let me know (I have some of this fresh
in-mind from other recent hacking).
I'm going to focus on the dynamic metrics changes first and leave all
the rest until I make sure I have this straight. More to follow on the
rest of the comments. In general, any guidance on fleshing out the
dynamic metrics framework would be great.
OK, I think the idea here (fullmetrictab, proc_init_hotproc, and
createHotprocMetric - and the namespace file scripting you talked
about earlier) are duplicating concepts from the dynamic namespace
support already used in the Linux pmdaproc. It seems like we can
fit this in better ... if the [hot]proc.{psinfo,id,memory,io,fd,
schedstat} subtrees become dynamic, they'd be able to share single
definition, help text, and so on.
So if I understand you correctly, the {psinfo,id,memory,io,fd,
schedstat} metrics become dynamic both in proc and hotproc? For
implementation, the steps would be something like?:
1. Clean out root_proc of metrics we want to make dynamic
2. Replicate the logic from cgroups.c and adapt to [hot]proc to create
these on the fly
3. Even though these are dynamic, we reuse existing cluster and id
numbers so as not to confuse client tools.
It seems like the first step would be to convert the existing pmda to
handle dynamic metrics for the appropriate clusters that already exist
before we worry about hotproc?
Do you want me to have a go at that or do you have a specific plan in
mind already?
Thanks
Martins
|