X-Git-Url: http://popeye.lapinbilly.eu/git/?p=vrac.git;a=blobdiff_plain;f=vmstat.pl;fp=vmstat.pl;h=2898f9166995ed86b6863fa7434dc8453a2f9f5c;hp=79c395a0f913fbe86eee72399a2583cd43a36ec6;hb=dde2d0bee304dda389110e4c7155ef71b7a889d7;hpb=56cb47bd31d42719e7109e7ff458f10984e4960e diff --git a/vmstat.pl b/vmstat.pl index 79c395a..2898f91 100755 --- a/vmstat.pl +++ b/vmstat.pl @@ -22,16 +22,18 @@ my %dict; while (1) { print scalar localtime() . "\n"; - print "------------------------\n" ; + print "------------------------\n"; system("/usr/bin/vmstat -z --libxo xml >$filename"); my $doc = XML::LibXML->load_xml(location => $filename); + my $c = 0; foreach my $id ($doc->findnodes('//zone')) { my $name=$id->findvalue('name'); my $used=$id->findvalue('used'); my $val = int($used); if ($name eq "vm pgcache") { - next; + $name = $name . "_$c"; + $c++; } if (exists $dict{$name}) {