| To: | Nathan Scott <nathans@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [pcp] PMDA CIFS |
| From: | AurÃlien Aptel <aurelien.aptel+pcp@xxxxxxxxx> |
| Date: | Tue, 3 Sep 2013 16:59:58 +0200 |
| Cc: | pcp@xxxxxxxxxxx |
| Delivered-to: | pcp@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5c6fuHCgd1SWDVR5syDbIOp3LjusDglBTARf5HMyO9U=; b=e0uruntNng/mMIWfP1yP+oZNz22jAink+21qMVwWhbLfzS/gXhmsvXiYbqU/zme2vI 0goOa98RzAdV23RoQkkVi7uuHuVqqHXCWYdTB3BO1nIma/KeQ8v/NYGHAjGXZLZ/Q33d 15sk4rwUQmEm2IkxzyaTZD6fwhQNSNWk5MwUZagUKPJ6IpFH+41vTXEh2SaHTTR7yVVE Y/wBfimbTxZs+tvMwr8xc2S90Y5TCoxy8H8Ah2oF1hkhkDS2/eBwX769Y7FL05fbOpCM XMsWD7UDYYAc/5/xonBcABB+wClGJf27BdqogTUH9mkTtpPV7zG2wHGw20qpYpgRT502 ta+Q== |
| In-reply-to: | <465361629.9900993.1377812441964.JavaMail.root@xxxxxxxxxx> |
| References: | <CA+5B0FNcq2X8EnNf35nMDGfu2Y5pSgOABVao7umiNiyNOjvFXw@xxxxxxxxxxxxxx> <2018836669.6550029.1377571301699.JavaMail.root@xxxxxxxxxx> <CA+5B0FOJCgd3_432=3n+OSHOAtxJ7RwHkivwnKqkmEUJC9uuKg@xxxxxxxxxxxxxx> <465361629.9900993.1377812441964.JavaMail.root@xxxxxxxxxx> |
| Sender: | aurelien.aptel@xxxxxxxxx |
I'm almost done but I *still* don't get how pmda_inst_lookup() and
hash-indom work...
I have the following at the end of cifs_fetch():
$PMDA->replace_indom(ALL_MOUNT_INDOM, \%SHARES);
$PMDA->replace_indom(SMB1_MOUNT_INDOM, \%smb1);
$PMDA->replace_indom(SMB2_MOUNT_INDOM, \%smb2);
$PMDA->log("fetch: ".Dumper(\%smb1));
And this in the cifs_fetch() callback:
my ($cluster, $item, $inst) = @_;
my $pmid = pmda_pmid($cluster, $item);
my $indom = $PMID_INDOM{$pmid};
if ($inst != PM_IN_NULL && $indom != PM_INDOM_NULL) {
my $v = pmda_inst_lookup($indom, $inst);
$PMDA->log("fetch_cb: ".Dumper($v));
}
But in the log, I have:
[Tue Sep 3 16:48:45] pmdacifs(7947) Info: fetch: $VAR1 = {
'\\\\localhost\\shareb' => {
'proto' => 'smb1',
'id' => 1
},
'\\\\localhost\\sharea' => {
'proto' => 'smb1',
'id' => 0
}
};
[Tue Sep 3 16:48:45] pmdacifs(7947) Info: fetch_cb: $VAR1 = undef;
[Tue Sep 3 16:48:45] pmdacifs(7947) Error: pmdaFetch: PMID
121.1.30 not handled by fetch callback
Why is $v undefined? It should be set to a hashref of a share set
above in fetch()!
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | pcp updates: mmv demos, Nathan Scott |
|---|---|
| Next by Date: | [no subject], EUROPEAN UNION= |
| Previous by Thread: | pcp updates: mmv demos, Nathan Scott |
| Next by Thread: | Re: [pcp] PMDA CIFS, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |