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
This commit is contained in:
Christian Göttsche
2020-10-13 16:03:37 +02:00
parent 0db398d4c3
commit 96e2a4259e
18 changed files with 61 additions and 24 deletions

View File

@ -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

View File

@ -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