in reply to Re: Generate Hash of hashes by reading a large Input file
in thread Generate Hash of hashes by reading a large Input file
I was more interested in the Total CPU/Memory/Storage allocation than the Overcommit ratio, So added one more section to the code .
.... some lines .... ....... } elsif(/^Resource Type/) { $section = 'resources'; ...... ..... elsif ('resources' eq $section) { if (my ($resource, $usage) = /^(CPU:|MEMORY:|ALLOCATED STORAGE:)\s+\S+\s+\S+\s+\S ++\s+\S+\s+\S+\s+\S+\s+(\S+)$/ ) { $usage =~ s/%//g; $zone{$current_zone}{cluster}{$current_cluster}{$resou +rce} = { usage => $usage}; } elsif (/^$/) { $section = 0; } ......
|
|---|