From 231d46e2bd5969d6e71e34b8bad01c60d5a6b3ec Mon Sep 17 00:00:00 2001 From: Marc Mance Date: Thu, 30 May 2024 16:32:26 -0400 Subject: [PATCH] update --- topstat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topstat.py b/topstat.py index 0ab57c2..d2f8a05 100644 --- a/topstat.py +++ b/topstat.py @@ -77,7 +77,7 @@ def runtopstat(): sleeping = processes[2] zombie = processes[3] - cpu = re.search("^CPU.*", output).group() + cpu = re.search("CPU:.*", output).group() cpu = re.sub("CPU.", "", cpu.strip()) cpu = re.sub("[a-z,%]", "", cpu.strip()).split() @@ -87,7 +87,7 @@ def runtopstat(): cpu_interrupt = cpu[3] cpu_idle = cpu[4] - mem = re.search("^Mem.*", output).group() + mem = re.search("Mem:.*", output).group() mem = re.sub("Mem.", "", mem.strip()) mem = re.sub("[Active|Inact|Wired|Free|,]", "", mem.strip()).split()