take into account reserved space (#4978)

Co-authored-by: omercier <32134301+omercier@users.noreply.github.com>
This commit is contained in:
Stéphane Duret 2024-04-08 14:54:10 +02:00 committed by GitHub
parent 8045d12d46
commit 25034afc23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -153,7 +153,7 @@ sub manage_selection {
my @lines = split /\n/, $stdout;
foreach my $line (@lines) {
next if ($line !~ /^(\S+)\s+(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/);
my ($fs, $type, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6, $7);
my ($fs, $type, $used, $available, $percent, $mount) = ($1, $2, $4, $5, $6, $7);
next if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
$fs !~ /$self->{option_results}->{filter_fs}/);
@ -170,9 +170,9 @@ sub manage_selection {
display => $mount,
fs => $fs,
type => $type,
total => $size * 1024,
used => $used * 1024,
free => $available * 1024
free => $available * 1024,
total => ($used + $available) * 1024
};
}

View File

@ -1,5 +1,7 @@
--display-transform-dst
--display-transform-src
--exclude-fs
--filter-fs
--filter-vdom
--force-counters32
--force-counters64
@ -13,6 +15,7 @@ ADSL
Centreon
Datacore
deltaps
df
eth
Fortigate
Fortinet