Hi,
A while back there was a fix to remove a limit of 1024 when importing
logs:
http://oss.sgi.com/cgi-bin/gitweb.cgi?p=pcp/pcp.git;a=commit;h=90ae8bc5e69e754760a9caa3cd0a18b2de0bc503
It would seem that the limitation still exists for PMDAs, see the below
test PMDA - it works as expected if the innermost loop is removed from
generate_metrics() (676 metrics added) but if the innermost loop is in
place, then only 1024 metrics are added even though there are over 17k
metrics in the hash:
use strict;
use warnings;
use PCP::PMDA;
my $pmda;
sub test_fetch_callback {
return (PM_ERR_AGAIN, 0);
}
sub generate_metrics {
my %metrics;
for my $i ("a".."z") {
for my $j ("a".."z") {
for my $k ("a".."z") {
$metrics{$i . $j . $k} = 0;
}
}
}
$pmda->log(scalar(keys %metrics));
return %metrics;
}
$pmda = PCP::PMDA->new('test', 497);
my %data = generate_metrics() unless defined($ENV{'PCP_PERL_DOMAIN'});
my $i = 0;
foreach my $key (keys %data) {
my $name = "test" . '.' . $key;
$pmda->add_metric(pmda_pmid(0, $i++), PM_TYPE_STRING, 0,
PM_SEM_INSTANT, pmda_units(0,0,0,0,0,0),
$name, '', '');
}
$pmda->set_fetch_callback(\&test_fetch_callback);
$pmda->run();
Thanks,
--
Marko Myllynen
|