Skip to content
Snippets Groups Projects
Commit 46dbb92e authored by Brian Dunavant's avatar Brian Dunavant
Browse files

Use a cleaner looping syntax that won't barf on certain versions of perl

parent e20c302c
No related branches found
No related tags found
No related merge requests found
...@@ -146,7 +146,7 @@ sub handler { ...@@ -146,7 +146,7 @@ sub handler {
/(.*)\:\s+(\d+).*/; /(.*)\:\s+(\d+).*/;
$metrics{$1} = [$2, 'L']; $metrics{$1} = [$2, 'L'];
} }
for my $page qw( cache inactive active wire free page ) { foreach my $page (qw/cache inactive active wire free page/) {
$metrics{"vm.stats.vm.v_${page}_count"}->[0] *= ($metrics{'vm.stats.vm.v_page_size'}->[0] / 1024); $metrics{"vm.stats.vm.v_${page}_count"}->[0] *= ($metrics{'vm.stats.vm.v_page_size'}->[0] / 1024);
} }
close(SYSCTL); close(SYSCTL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment