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()