use warnings;
use strict;
+use feature 'say';
use XML::LibXML;
my ($offset) = @ARGV;
while (1) {
- print scalar localtime() . "\n";
- print "------------------------\n";
+ say scalar localtime();
+ say "------------------------";
system("/usr/bin/vmstat -z --libxo xml >$filename");
my $doc = XML::LibXML->load_xml(location => $filename);
my $c = 0;
}
}
- print "\n";
+ say '';
sleep(5);
}
#
use warnings;
use strict;
+use feature 'say';
use XML::LibXML;
}
while (1) {
- print scalar localtime() . "\n";
+ say scalar localtime();
+ say "------------------------";
system("/usr/bin/vmstat -m --libxo xml >$filename");
my $doc = XML::LibXML->load_xml(location => $filename);
foreach my $id ( $doc->findnodes('//memory')) {
$dict{$name}=$used;
}
}
- print "------------------------\n" ;
+ say '';
sleep(5);
}