summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcessList.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2022-02-27 20:29:40 +0100
committerBenBE <BenBE@geshi.org>2022-03-06 19:56:25 +0100
commitedf319e53d1fb77546505e238d75160a3febe56e (patch)
treec735eef42730d65228958c2e104817ae7362e614 /linux/LinuxProcessList.c
parentb6c0667eae104521e71ab9c4f4a785e386bce3e5 (diff)
Auto-size (normalized) CPU usage columns
Diffstat (limited to 'linux/LinuxProcessList.c')
-rw-r--r--linux/LinuxProcessList.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 6d0d7992..b0e6f03a 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1548,6 +1548,7 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
float percent_cpu = (period < 1E-6) ? 0.0F : ((lp->utime + lp->stime - lasttimes) / period * 100.0);
proc->percent_cpu = CLAMP(percent_cpu, 0.0F, activeCPUs * 100.0F);
proc->percent_mem = proc->m_resident / (double)(pl->totalMem) * 100.0;
+ Process_updateCPUFieldWidths(proc->percent_cpu);
if (! LinuxProcessList_updateUser(pl, proc, procFd))
goto errorReadingProcess;

© 2014-2024 Faster IT GmbH | imprint | privacy policy