Hi,
I got the same issue.
To solve it (for Zimbra 6.0.6 OSE), I modified the Perl script
/opt/zimbra/libexec/zmstat-df.
In the routine
get_df_stat(), I added the lines in red:
Code:
sub get_df_stat() {
open(DF, "$DF |") || die "Can't open $DF: $!";
my $dev;
my @stats;
while (<DF>) {
next if ($_ =~ /^Filesystem\s+/);
my ($space, $used, $avail, $pct, $path);
if ($_ =~ /^(\S+)\s*$/) {
$dev = $1;
next;
} elsif ($_ =~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+(.+)/) {
$dev = $1;
$space = $2;
$used = $3;
$avail = $4;
$pct = $5;
$path = $6;
} elsif ($_ =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+(.+)/) {
$space = $1;
$used = $2;
$avail = $3;
$pct = $4;
$path = $5;
}
next if $dev !~ m#^/#;
# Check only some paths
next if ($path !~ m#^/$# and $path !~ m#^/opt/zimbra#);
push(@stats, {
path => $path,
disk => $dev,
disk_use => $used,
disk_pct_used => $pct,
disk_space => $space
});
}
close DF;
@stats;
} So disk usage statistics are gathered only for
/ and
/opt/zimbra.
I hope this will help.
Regards,
Philippe