Instead of RSS, let's use the same PSS values as for the specific host
view as default, in case this value is not overwritten by the balloon
info.

Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com>
---
 PVE/QemuServer.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c5eb5c1..74850b7 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2916,10 +2916,6 @@ sub vmstatus {
 
        $d->{uptime} = int(($uptime - $pstat->{starttime})/$cpuinfo->{user_hz});
 
-       if ($pstat->{vsize}) {
-           $d->{mem} = int(($pstat->{rss}/$pstat->{vsize})*$d->{maxmem});
-       }
-
        my $old = $last_proc_pid_stat->{$pid};
        if (!$old) {
            $last_proc_pid_stat->{$pid} = {
@@ -2960,6 +2956,8 @@ sub vmstatus {
            }
        }
        close($fh);
+
+       $d->{mem} = $d->{memhost};
     }
 
     return $res if !$full;
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to