[Resmon-devel] [resmon commit] r166 - trunk/lib/Resmon/Module
svn-commit at lists.omniti.com
svn-commit at lists.omniti.com
Tue Mar 24 13:05:06 EDT 2009
Author: mark
Date: 2009-03-24 13:05:05 -0400 (Tue, 24 Mar 2009)
New Revision: 166
Modified:
trunk/lib/Resmon/Module/REMOTEFILESIZE.pm
Log:
du -b isn't portable, switch to du -k and multply by 1024
Modified: trunk/lib/Resmon/Module/REMOTEFILESIZE.pm
===================================================================
--- trunk/lib/Resmon/Module/REMOTEFILESIZE.pm 2009-03-24 15:43:27 UTC (rev 165)
+++ trunk/lib/Resmon/Module/REMOTEFILESIZE.pm 2009-03-24 17:05:05 UTC (rev 166)
@@ -7,9 +7,9 @@
my $arg = shift;
my $host = $arg->{'host'};
my $file = $arg->{'object'};
- my $output = cache_command("ssh -i /root/.ssh/id_dsa $host du -b $file", 600);
+ my $output = cache_command("ssh -i /root/.ssh/id_dsa $host du -k $file", 600);
$output =~ /^(\d+)\s/;
- my $size = $1;
+ my $size = $1 * 1024;
my $minsize = $arg->{minimum};
my $maxsize = $arg->{maximum};
return "BAD($size, too big)"
More information about the Resmon-devel
mailing list