Hi Chandana,
----- Original Message -----
> Hello Nathan,
> I have been having a look at the postfix pmda and the memcache pmda to
> get a sense of how to go about making a fix
> I think I need a bit more help.
OK, no problem.
> If I understand this correctly, Âthe steps are;
> 1. new function named call_qshape to call qshape for a given queue,
> read the data and update $caches{$qname}
> 2. set up file pmda timer (one for each queue) to run the above
> function
> The above two steps wil replace postfix_fetch_callback and
> postfix_do_refresh.
> Am I on the right track ?
Yes - you'll need a postfix_fetch_callback() still, as this fills in
the results for a pmFetch(3). It will behave differently though - its
got to be low-latency, so postfix_do_refresh() cannot be called there,
it needs to just return previously-refreshed-via-timer values.
> Also I can't see the use of the 'cluster' variable
> inÂpostfix_fetch_callback. It does not get passed in
Hmm, I'm not sure I understand the question - $cluster is passed in as the
first parameter... it is the cluster component of the PMID ($item being the
other PMID component passed in there) - see <pcp/impl.h>
sub postfix_fetch_callback
{
my ($cluster, $item, $inst) = @_;
my $metric_name = pmda_pmid_name($cluster, $item);
cheers.
--
Nathan
|