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 = [