X-Git-Url: http://popeye.lapinbilly.eu/git/?p=vrac.git;a=blobdiff_plain;f=vmstat.pl;fp=vmstat.pl;h=79c395a0f913fbe86eee72399a2583cd43a36ec6;hp=9e7f436614d3d97390ae7c5de633ae2882e57057;hb=56cb47bd31d42719e7109e7ff458f10984e4960e;hpb=100eef73b68e12eee1a92644282b8f2924833761 diff --git a/vmstat.pl b/vmstat.pl index 9e7f436..79c395a 100755 --- a/vmstat.pl +++ b/vmstat.pl @@ -7,11 +7,17 @@ use strict; use XML::LibXML; +my ($offset) = @ARGV; + +if (not defined $offset) { + $offset = 10; +} + my $filename = 'vmstat.xml'; my %dict; -my $offset = 10; + while (1) { @@ -31,7 +37,7 @@ while (1) { if (exists $dict{$name}) { my $v0=$dict{$name} + $offset; - if ($v0 < $val) { + if ($v0 <= $val) { format DIFF_V0V1 = @<<<<<<<<<<<<<<<<<<<<<< @######## => @######## $name,$v0,$val