From 732bf175caf582a7f0c8fa16b45ad8ff40a8d414 Mon Sep 17 00:00:00 2001 From: Raffaello Bonghi Date: Thu, 25 Jul 2024 17:44:10 +0100 Subject: [PATCH] Fix #522 --- jtop/core/processes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jtop/core/processes.py b/jtop/core/processes.py index e6d63e87..0181fdb2 100644 --- a/jtop/core/processes.py +++ b/jtop/core/processes.py @@ -106,7 +106,7 @@ def get_process_info(self, pid, gpu_mem_usage, process_name, uptime): stime = float(stat[14]) starttime = float(stat[21]) / self._clk_tck total_time = (utime + stime) / self._clk_tck - proc_uptime = uptime - starttime + proc_uptime = max(1, uptime - starttime) cpu_percent = 100 * (total_time / proc_uptime) process = [