From 96e2a4259eb0cdf279b83d899f805d274d13a94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 13 Oct 2020 16:03:37 +0200 Subject: Continue to update generic data in paused mode Generic data, as CPU and memory usage, are used by Meters. In paused mode they would stop receiving updates and especially Graph Meters would stop showing continuous data. Improves: #214 Closes: #253 --- dragonflybsd/DragonFlyBSDProcessList.c | 6 +++++- dragonflybsd/DragonFlyBSDProcessList.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'dragonflybsd') diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c index 87f16069..e2a01270 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.c +++ b/dragonflybsd/DragonFlyBSDProcessList.c @@ -358,7 +358,7 @@ char* DragonFlyBSDProcessList_readJailName(DragonFlyBSDProcessList* dfpl, int ja return jname; } -void ProcessList_goThroughEntries(ProcessList* this) { +void ProcessList_goThroughEntries(ProcessList* this, bool pauseProcessUpdate) { DragonFlyBSDProcessList* dfpl = (DragonFlyBSDProcessList*) this; Settings* settings = this->settings; bool hideKernelThreads = settings->hideKernelThreads; @@ -368,6 +368,10 @@ void ProcessList_goThroughEntries(ProcessList* this) { DragonFlyBSDProcessList_scanCPUTime(this); DragonFlyBSDProcessList_scanJails(dfpl); + // in pause mode only gather global data for meters (CPU/memory/...) + if (pauseProcessUpdate) + return; + int count = 0; // TODO Kernel Threads seem to be skipped, need to figure out the correct flag diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h index f35e60eb..47531297 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.h +++ b/dragonflybsd/DragonFlyBSDProcessList.h @@ -59,6 +59,6 @@ char* DragonFlyBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kpro char* DragonFlyBSDProcessList_readJailName(DragonFlyBSDProcessList* dfpl, int jailid); -void ProcessList_goThroughEntries(ProcessList* this); +void ProcessList_goThroughEntries(ProcessList* this, pauseProcessUpdate); #endif -- cgit v1.2.3