pcp
[Top] [All Lists]

Re: writing a PMDA: multiple instances to a metric

To: pcp@xxxxxxxxxxx
Subject: Re: writing a PMDA: multiple instances to a metric
From: Max Matveev <makc@xxxxxxx>
Date: Mon, 1 Oct 2001 18:04:32 +1000 (EST)
In-reply-to: <Pine.GSO.4.21.0110010004400.23718-100000@pollux.cis.ksu.edu>
References: <Pine.GSO.4.21.0110010004400.23718-100000@pollux.cis.ksu.edu>
Sender: owner-pcp@xxxxxxxxxxx
>>>>> "MSRT" == Madhu Sudhan R Tera <mst9696@xxxxxxxxxxx> writes:

 MSRT> HOW can i assign values to a metric that has multiple
 MSRT> instances??

As per normal - you decide which instance punter is after and stuff it
into the pmAtom, given as a paramter to fetchCallBack
method. Remember, metrics and instances are somewhat orthogonal, so to
get to a particular value, you have to specify both.

 MSRT> I have one more question. HOW MANY TIMES IS
 MSRT> netstat_fetchCallBack method is invoked.Is it true that it is
 MSRT> called as many times as there are metrics (in my case 5 times,
 MSRT> as i have 5 metrics pid, sport, saddr, dport,bandwidth)

Assuming you're using libpcp_pmda, it will be called for EACH instance
for EACH metric, ie. if you have 5 metrics with 4 instances each, it
will be called 20 times.

max

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