Skip to content

Commit a49dece

Browse files
authored
API: consider inactive memory as used memory
1 parent 1d06038 commit a49dece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function systemResourcesAction()
173173
$fc = $mem['vm.stats.vm.v_free_count'];
174174
$result['memory']['total'] = $mem['hw.physmem'];
175175
$result['memory']['total_frmt'] = sprintf('%d', $mem['hw.physmem'] / 1024 / 1024);
176-
$result['memory']['used'] = round(((($pc - ($ic + $cc + $fc))) / $pc) * $mem['hw.physmem'], 0);
176+
$result['memory']['used'] = round(((($pc - ($cc + $fc))) / $pc) * $mem['hw.physmem'], 0);
177177
$result['memory']['used_frmt'] = sprintf('%d', $result['memory']['used'] / 1024 / 1024);
178178
if (!empty($mem['kstat.zfs.misc.arcstats.size'])) {
179179
$arc_size = $mem['kstat.zfs.misc.arcstats.size'];

0 commit comments

Comments
 (0)