This commit is contained in:
garnier-quentin 2019-07-18 09:12:59 +02:00
parent 4c7191d015
commit 7987416759
1 changed files with 8 additions and 6 deletions

View File

@ -139,12 +139,14 @@ sub manage_selection {
total => $results->{$oid_memTotalReal64},
};
$self->{swap} = {
prct_used => ($results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64}) * 100 / ($results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64}),
used => $results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64},
free => $results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64} - ($results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64}),
total => $results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64}
};
if ($results->{$oid_memTotalVirtual64} > $results->{$oid_memTotalReal64}) {
$self->{swap} = {
prct_used => ($results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64}) * 100 / ($results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64}),
used => $results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64},
free => $results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64} - ($results->{$oid_memActiveVirtual64} - $results->{$oid_memActiveReal64}),
total => $results->{$oid_memTotalVirtual64} - $results->{$oid_memTotalReal64}
};
}
$self->{malloc} = { failed_mallocs => $results->{$oid_fwKmemFailedAlloc} };
}