/usr/share/perl5/PCP/extract.pl is in libpcp-logsummary-perl 3.9.10.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/perl
use strict;
use warnings;
use PCP::LogSummary;
my $archive = 't/db/20081125';
my @metrics = ( 'kernel.all.cpu.user', 'kernel.all.cpu.idle',
'kernel.all.cpu.intr', 'kernel.all.cpu.sys' );
my $results = PCP::LogSummary->new($archive, \@metrics, '@09:00', '@17:00');
#my $results = PCP::LogSummary->new($archive, \@metrics);
foreach my $metric ( keys %$results ) {
my $summary = $$results{$metric};
print "metric=", $metric, "\n";
print " average=", $$summary{'average'}, "\n";
print " samples=", $$summary{'samples'}, "\n";
}
|