From 0f611cb0338a6ec884e4e15a4de6947dd2fb78c4 Mon Sep 17 00:00:00 2001 From: A <63972733+astar10239@users.noreply.github.com> Date: Wed, 4 Dec 2024 05:27:05 +0530 Subject: [PATCH] Update vmtop.py to fix memory int calc --- vmtop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmtop.py b/vmtop.py index a1479cc..8f391c4 100755 --- a/vmtop.py +++ b/vmtop.py @@ -548,7 +548,7 @@ def get_vm_info(self): elif cmdline[i].startswith("-name"): self.name = cmdline[i + 1] elif cmdline[i] == "-m": - self.mem_allocated = int(cmdline[i + 1]) + self.mem_allocated = int(str(cmdline[i + 1]).replace('k', '').replace('size=', '')) elif cmdline[i] == "-smp": self.total_vcpu_count = int(cmdline[i + 1].split(",")[0])